Commit b0beb280 authored by Jens Axboe's avatar Jens Axboe

Revert "block: end bio with BLK_STS_AGAIN in case of non-mq devs and REQ_NOWAIT"

This reverts commit c58c1f83.

io_uring does do the right thing for this case, and we're still returning
-EAGAIN to userspace for the cases we don't support. Revert this change
to avoid doing endless spins of resubmits.

Cc: stable@vger.kernel.org # v5.6
Reported-by: default avatarBijan Mottahedeh <bijan.mottahedeh@oracle.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 15fede12
...@@ -891,14 +891,11 @@ generic_make_request_checks(struct bio *bio) ...@@ -891,14 +891,11 @@ generic_make_request_checks(struct bio *bio)
} }
/* /*
* Non-mq queues do not honor REQ_NOWAIT, so complete a bio * For a REQ_NOWAIT based request, return -EOPNOTSUPP
* with BLK_STS_AGAIN status in order to catch -EAGAIN and * if queue is not a request based queue.
* to give a chance to the caller to repeat request gracefully.
*/ */
if ((bio->bi_opf & REQ_NOWAIT) && !queue_is_mq(q)) { if ((bio->bi_opf & REQ_NOWAIT) && !queue_is_mq(q))
status = BLK_STS_AGAIN; goto not_supported;
goto end_io;
}
if (should_fail_bio(bio)) if (should_fail_bio(bio))
goto end_io; goto end_io;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment