aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorJens Axboe <[email protected]>2022-09-21 08:24:16 -0600
committerJens Axboe <[email protected]>2022-09-30 07:49:11 -0600
commitab3e1d3bbab9e973aeb4dd4603251578658a47ff (patch)
treecc5a5b81f354800fbf19c280cd966f54eab13137 /include/linux
parentde671d6116b5210097cd6fbb877bac92536f265b (diff)
block: allow end_io based requests in the completion batch handling
With end_io handlers now being able to potentially pass ownership of the request upon completion, we can allow requests with end_io handlers in the batch completion handling. Reviewed-by: Anuj Gupta <[email protected]> Reviewed-by: Keith Busch <[email protected]> Co-developed-by: Stefan Roesch <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/blk-mq.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h
index e6fa49dd6196..50811d0fb143 100644
--- a/include/linux/blk-mq.h
+++ b/include/linux/blk-mq.h
@@ -853,8 +853,9 @@ static inline bool blk_mq_add_to_batch(struct request *req,
struct io_comp_batch *iob, int ioerror,
void (*complete)(struct io_comp_batch *))
{
- if (!iob || (req->rq_flags & RQF_ELV) || req->end_io || ioerror)
+ if (!iob || (req->rq_flags & RQF_ELV) || ioerror)
return false;
+
if (!iob->complete)
iob->complete = complete;
else if (iob->complete != complete)