From cbc8d5ee9bfd2feb36c761fb5b9c1c4b8cc6a972 Mon Sep 17 00:00:00 2001 From: Brian Meagher Date: Thu, 5 Jan 2023 07:41:25 -0800 Subject: [PATCH] scst/include/backport.h: Do not set rq->end_io to NULL Fix a regression introduced during d989aa91f31f ("scst_lib: Port to Linux kernel v5.19") that breaks dev_disk operation. The kernel function blk_execute_rq_nowait will set rq->end_io to the done parameter, so pass in the existing rq->end_io rather than NULL to prevent zeroing it. Fixes: d989aa91f31f ("scst_lib: Port to Linux kernel v5.19") [ glebchesn: added patch description ] --- scst/include/backport.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scst/include/backport.h b/scst/include/backport.h index 6bf06a503..dd98d9b72 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -204,15 +204,15 @@ void blk_execute_rq_nowait_backport(struct request *rq, bool at_head) * See also commit 8eeed0b554b9 ("block: remove unnecessary argument from * blk_execute_rq_nowait") # v5.12. */ - blk_execute_rq_nowait(rq->q, NULL, rq, at_head, NULL); + blk_execute_rq_nowait(rq->q, NULL, rq, at_head, rq->end_io); #elif LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0) /* * See also commit b84ba30b6c7a ("block: remove the gendisk argument to * blk_execute_rq") # v5.17. */ - blk_execute_rq_nowait(NULL, rq, at_head, NULL); + blk_execute_rq_nowait(NULL, rq, at_head, rq->end_io); #else - blk_execute_rq_nowait(rq, at_head, NULL); + blk_execute_rq_nowait(rq, at_head, rq->end_io); #endif }