[Devel] [PATCH RH8 01/18] ploop: Simplify ploop_write_cluster_sync()
Kirill Tkhai
ktkhai at virtuozzo.com
Wed Jun 16 18:46:21 MSK 2021
Pass correct argument to init_pio() instead of rewriting
it later.
bi_status is already initialized in init_pio().
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
drivers/md/dm-ploop-cmd.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/md/dm-ploop-cmd.c b/drivers/md/dm-ploop-cmd.c
index c50749d7d522..25ebdb878c22 100644
--- a/drivers/md/dm-ploop-cmd.c
+++ b/drivers/md/dm-ploop-cmd.c
@@ -214,11 +214,9 @@ static int ploop_write_cluster_sync(struct ploop *ploop, struct pio *pio,
if (ret)
return ret;
- init_pio(ploop, REQ_OP_READ, pio);
+ init_pio(ploop, REQ_OP_WRITE, pio);
pio_prepare_offsets(ploop, pio, dst_cluster);
- pio->bi_status = BLK_STS_OK;
- pio->bi_op = REQ_OP_WRITE;
pio->endio_cb = wake_completion;
pio->endio_cb_data = &completion;
More information about the Devel
mailing list