[Devel] [PATCH RH8 2/3] ploop: Use dm_complete_request() instead of dm_request_set_error()

Kirill Tkhai ktkhai at virtuozzo.com
Fri May 21 13:05:18 MSK 2021


dm_request_set_error() will be killed in next patches.

Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 drivers/md/dm-ploop-map.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/md/dm-ploop-map.c b/drivers/md/dm-ploop-map.c
index 8f53e247b778..f8c3b0caa160 100644
--- a/drivers/md/dm-ploop-map.c
+++ b/drivers/md/dm-ploop-map.c
@@ -8,6 +8,7 @@
 #include <linux/blk-mq.h>
 #include <uapi/linux/falloc.h>
 #include "dm-ploop.h"
+#include "dm-rq.h"
 
 #define PREALLOC_SIZE (128ULL * 1024 * 1024)
 
@@ -135,12 +136,10 @@ static void prq_endio(struct pio *pio, void *prq_ptr, blk_status_t bi_status)
         struct ploop_rq *prq = prq_ptr;
         struct request *rq = prq->rq;
 
-	if (bi_status)
-		dm_request_set_error(rq, bi_status);
-
 	if (prq->bvec)
 		kfree(prq->bvec);
-	blk_mq_complete_request(rq);
+
+	dm_complete_request(rq, bi_status);
 }
 
 static void do_pio_endio(struct pio *pio)




More information about the Devel mailing list