diff options
author | Christoph Hellwig <hch@lst.de> | 2022-07-06 09:03:37 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-07-06 06:46:25 -0600 |
commit | edd1dbc83b1de3b98590b76e09b86ddf6887fce7 (patch) | |
tree | f6362103f2356fe4e6a0095e0363dfcbc2ff266e /block/blk-core.c | |
parent | 6cc37a672a1e21245b931722a016b3bd4ae10e2d (diff) | |
download | lwn-edd1dbc83b1de3b98590b76e09b86ddf6887fce7.tar.gz lwn-edd1dbc83b1de3b98590b76e09b86ddf6887fce7.zip |
block: use bdev_is_zoned instead of open coding it
Use bdev_is_zoned in all places where a block_device is available instead
of open coding it.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Link: https://lore.kernel.org/r/20220706070350.1703384-4-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-core.c')
-rw-r--r-- | block/blk-core.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index 5ad7bd93077c..6bcca0b686de 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -569,7 +569,7 @@ static inline blk_status_t blk_check_zone_append(struct request_queue *q, int nr_sectors = bio_sectors(bio); /* Only applicable to zoned block devices */ - if (!blk_queue_is_zoned(q)) + if (!bdev_is_zoned(bio->bi_bdev)) return BLK_STS_NOTSUPP; /* The bio sector must point to the start of a sequential zone */ @@ -775,11 +775,11 @@ void submit_bio_noacct(struct bio *bio) case REQ_OP_ZONE_OPEN: case REQ_OP_ZONE_CLOSE: case REQ_OP_ZONE_FINISH: - if (!blk_queue_is_zoned(q)) + if (!bdev_is_zoned(bio->bi_bdev)) goto not_supported; break; case REQ_OP_ZONE_RESET_ALL: - if (!blk_queue_is_zoned(q) || !blk_queue_zone_resetall(q)) + if (!bdev_is_zoned(bio->bi_bdev) || !blk_queue_zone_resetall(q)) goto not_supported; break; case REQ_OP_WRITE_ZEROES: |