diff options
author | Pankaj Raghav <[email protected]> | 2023-01-10 15:36:33 +0100 |
---|---|---|
committer | Jens Axboe <[email protected]> | 2023-01-29 15:18:34 -0700 |
commit | fea127b36c93d9afe49561b640fe1fc541dc3ba4 (patch) | |
tree | 34e13d12c3e8f96416f5424c3962ddad01859c32 | |
parent | 7e2e355dd9c9031e19b573d2c48171b0418ec552 (diff) |
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 <[email protected]>
Reviewed-by: Damien Le Moal <[email protected]>
Reviewed-by: Bart Van Assche <[email protected]>
Reviewed-by: Chaitanya Kulkarni <[email protected]>
Reviewed-by: Johannes Thumshirn <[email protected]>
Signed-off-by: Pankaj Raghav <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
-rw-r--r-- | include/linux/blkdev.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index b87ed829ab94..0956bc0fb5b0 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, |