aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamien Le Moal <dlemoal@kernel.org>2024-05-01 20:09:05 +0900
committerJens Axboe <axboe@kernel.dk>2024-05-01 08:08:43 -0600
commitb5a64ec2ea2be2a7f7eb73c243c2381e9fc1c71b (patch)
tree0f943b22d27ecc0b205c464d585377fd4f2c8ca5
parent347bde9da10f410b8134a82d6096105cad44e1c1 (diff)
downloadlinux-b5a64ec2ea2be2a7f7eb73c243c2381e9fc1c71b.tar.gz
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>
-rw-r--r--block/blk-zoned.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/block/blk-zoned.c b/block/blk-zoned.c
index 759e85e9167cfd..132eb988f4d7d9 100644
--- a/block/blk-zoned.c
+++ b/block/blk-zoned.c
@@ -1222,8 +1222,7 @@ void blk_zone_write_plug_bio_endio(struct bio *bio)
{
struct gendisk *disk = bio->bi_bdev->bd_disk;
struct blk_zone_wplug *zwplug =
- disk_get_zone_wplug(bio->bi_bdev->bd_disk,
- bio->bi_iter.bi_sector);
+ disk_get_zone_wplug(disk, bio->bi_iter.bi_sector);
unsigned long flags;
if (WARN_ON_ONCE(!zwplug))