mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 20:32:04 +09:00
FROMLIST: 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 <hch@lst.de> Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Pankaj Raghav <p.raghav@samsung.com> Bug: 197782466 Bug: 269471019 Link: https://lore.kernel.org/linux-block/20230110143635.77300-2-p.raghav@samsung.com/ Change-Id: I016ba8e1462d97f9b9a25e5f12371854294511fb Signed-off-by: Bart Van Assche <bvanassche@google.com>
This commit is contained in:
committed by
Treehugger Robot
parent
19ce16cc96
commit
5d1853d5f4
@@ -1635,12 +1635,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 sector_t bdev_zone_sectors(struct block_device *bdev)
|
||||
|
||||
Reference in New Issue
Block a user