blk-mq: fix two misuses on RQF_USE_SCHED
[platform/kernel/linux-starfive.git] / include / linux / blk-mq.h
index f401067..aaed687 100644 (file)
@@ -852,7 +852,11 @@ 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_USE_SCHED) || ioerror ||
+       /*
+        * blk_mq_end_request_batch() can't end request allocated from
+        * sched tags
+        */
+       if (!iob || (req->rq_flags & RQF_SCHED_TAGS) || ioerror ||
                        (req->end_io && !blk_rq_is_passthrough(req)))
                return false;