aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
authorDamien Le Moal <dlemoal@kernel.org>2026-02-27 22:19:47 +0900
committerJens Axboe <axboe@kernel.dk>2026-03-09 14:30:00 -0600
commitc30e8c4bb0e088068a7aae2d98882ec1cfa57d4c (patch)
tree2c20e54f1504209e18a9472f9318a1cb2e1aa82f /block
parent1084e41deeada93eebfd83572cf29029c24e5443 (diff)
downloadlinux-next-history-c30e8c4bb0e088068a7aae2d98882ec1cfa57d4c.tar.gz
block: remove disk_zone_is_full()
The helper function disk_zone_is_full() is only used in disk_zone_wplug_is_full(). So remove it and open code it directly in this single caller. Signed-off-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
-rw-r--r--block/blk-zoned.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/block/blk-zoned.c b/block/blk-zoned.c
index 185651a0d6173..26c2aa79faf62 100644
--- a/block/blk-zoned.c
+++ b/block/blk-zoned.c
@@ -492,18 +492,12 @@ static bool disk_zone_is_last(struct gendisk *disk, struct blk_zone *zone)
return zone->start + zone->len >= get_capacity(disk);
}
-static bool disk_zone_is_full(struct gendisk *disk,
- unsigned int zno, unsigned int offset_in_zone)
-{
- if (zno < disk->nr_zones - 1)
- return offset_in_zone >= disk->zone_capacity;
- return offset_in_zone >= disk->last_zone_capacity;
-}
-
static bool disk_zone_wplug_is_full(struct gendisk *disk,
struct blk_zone_wplug *zwplug)
{
- return disk_zone_is_full(disk, zwplug->zone_no, zwplug->wp_offset);
+ if (zwplug->zone_no < disk->nr_zones - 1)
+ return zwplug->wp_offset >= disk->zone_capacity;
+ return zwplug->wp_offset >= disk->last_zone_capacity;
}
static bool disk_insert_zone_wplug(struct gendisk *disk,