Skip to content

Commit b5a64ec

Browse files
damien-lemoalaxboe
authored andcommitted
block: Simplify blk_zone_write_plug_bio_endio()
We already have the disk variable obtained from the bio when calling disk_get_zone_wplug(). So use that variable instead of dereferencing the bio bdev again for the disk argument of disk_get_zone_wplug(). Signed-off-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Link: https://lore.kernel.org/r/20240501110907.96950-13-dlemoal@kernel.org Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 347bde9 commit b5a64ec

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

block/blk-zoned.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1222,8 +1222,7 @@ void blk_zone_write_plug_bio_endio(struct bio *bio)
12221222
{
12231223
struct gendisk *disk = bio->bi_bdev->bd_disk;
12241224
struct blk_zone_wplug *zwplug =
1225-
disk_get_zone_wplug(bio->bi_bdev->bd_disk,
1226-
bio->bi_iter.bi_sector);
1225+
disk_get_zone_wplug(disk, bio->bi_iter.bi_sector);
12271226
unsigned long flags;
12281227

12291228
if (WARN_ON_ONCE(!zwplug))

0 commit comments

Comments
 (0)