From 3ee227c2a5a8ac526b6f9bead2a458da89f6c11e Mon Sep 17 00:00:00 2001 From: Jeffle Xu Date: Mon, 19 Oct 2020 16:59:42 +0800 Subject: [PATCH 2281/2944] io_uring: use blk_queue_nowait() to check if NOWAIT supported commit 9ba0d0c81284f4ec0b24529bdba2fc68b9d6a09a upstream. commit 021a24460dc2 ("block: add QUEUE_FLAG_NOWAIT") adds a new helper function blk_queue_nowait() to check if the bdev supports handling of REQ_NOWAIT or not. Since then bio-based dm device can also support REQ_NOWAIT, and currently only dm-linear supports that since commit 6abc49468eea ("dm: add support for REQ_NOWAIT and enable it for linear target"). Signed-off-by: Jeffle Xu Signed-off-by: Jens Axboe Reviewed-by: Joseph Qi --- fs/io_uring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/io_uring.c b/fs/io_uring.c index 141c3eb..1390ae4 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -2257,7 +2257,7 @@ static struct file *__io_file_get(struct io_submit_state *state, int fd) static bool io_bdev_nowait(struct block_device *bdev) { #ifdef CONFIG_BLOCK - return !bdev || queue_is_rq_based(bdev_get_queue(bdev)); + return !bdev || blk_queue_nowait(bdev_get_queue(bdev)); #else return true; #endif -- 1.8.3.1