summaryrefslogtreecommitdiff
path: root/drivers/block/loop.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2022-04-15 06:52:42 +0200
committerJens Axboe <axboe@kernel.dk>2022-04-17 19:49:59 -0600
commit10f0d2a517796b8f6dc04fb0cc3e49003ae6b0bc (patch)
tree294ac1a4503f37520ebbc866e4c7313818b27d77 /drivers/block/loop.c
parent9964e674559b02619fee2012a56839624143d02e (diff)
block: add a bdev_nonrot helper
Add a helper to check the nonrot flag based on the block_device instead of having to poke into the block layer internal request_queue. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Acked-by: David Sterba <dsterba@suse.com> [btrfs] Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Link: https://lore.kernel.org/r/20220415045258.199825-12-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/loop.c')
-rw-r--r--drivers/block/loop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index a58595f5ee2c..8d800d46e498 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -903,7 +903,7 @@ static void loop_update_rotational(struct loop_device *lo)
/* not all filesystems (e.g. tmpfs) have a sb->s_bdev */
if (file_bdev)
- nonrot = blk_queue_nonrot(bdev_get_queue(file_bdev));
+ nonrot = bdev_nonrot(file_bdev);
if (nonrot)
blk_queue_flag_set(QUEUE_FLAG_NONROT, q);