[Devel] [PATCH RHEL8 COMMIT] ploop: Use dm_complete_request() instead of dm_request_set_error()

Konstantin Khorenko khorenko at virtuozzo.com
Mon May 24 13:00:39 MSK 2021


The commit is pushed to "branch-rh8-4.18.0-240.1.1.vz8.5.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-240.1.1.vz8.5.31
------>
commit 5fdb838c723507e7b626206ffd5b692fc1b5d73e
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date:   Mon May 24 13:00:39 2021 +0300

    ploop: Use dm_complete_request() instead of dm_request_set_error()
    
    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