From: Pankaj Raghav
Date: Tue, 10 Jan 2023 14:36:33 +0000 (+0100)
Subject: block: remove superfluous check for request queue in bdev_is_zoned()
X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=fea127b36c93;p=linux.git
block: remove superfluous check for request queue in bdev_is_zoned()
Remove the superfluous request queue check in bdev_is_zoned() as
bdev_get_queue() can never return NULL.
Reviewed-by: Christoph Hellwig
Reviewed-by: Damien Le Moal
Reviewed-by: Bart Van Assche
Reviewed-by: Chaitanya Kulkarni
Reviewed-by: Johannes Thumshirn
Signed-off-by: Pankaj Raghav
Link: https://lore.kernel.org/r/20230110143635.77300-2-p.raghav@samsung.com
Signed-off-by: Jens Axboe
---
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index b87ed829ab941..0956bc0fb5b09 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -1285,12 +1285,7 @@ static inline enum blk_zoned_model bdev_zoned_model(struct block_device *bdev)
static inline bool bdev_is_zoned(struct block_device *bdev)
{
- struct request_queue *q = bdev_get_queue(bdev);
-
- if (q)
- return blk_queue_is_zoned(q);
-
- return false;
+ return blk_queue_is_zoned(bdev_get_queue(bdev));
}
static inline bool bdev_op_is_zoned_write(struct block_device *bdev,