Commit 8c31a3db authored by Nikolay Borisov's avatar Nikolay Borisov Committed by David Sterba

btrfs: zoned: remove unused variable in btrfs_sb_log_location_bdev

This fixes warning:

fs/btrfs/zoned.c:491:6: warning: variable ‘zone_size’ set but not used [-Wunused-but-set-variable]
  491 |  u64 zone_size;

which got introduced in 12659251 ("btrfs: implement log-structured
superblock for ZONED mode"). We'll enable the warning by default and
want clean build until the relevant zoned patches land.
Signed-off-by: default avatarNikolay Borisov <nborisov@suse.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 3bed2da1
...@@ -488,7 +488,6 @@ int btrfs_sb_log_location_bdev(struct block_device *bdev, int mirror, int rw, ...@@ -488,7 +488,6 @@ int btrfs_sb_log_location_bdev(struct block_device *bdev, int mirror, int rw,
unsigned int zone_sectors; unsigned int zone_sectors;
u32 sb_zone; u32 sb_zone;
int ret; int ret;
u64 zone_size;
u8 zone_sectors_shift; u8 zone_sectors_shift;
sector_t nr_sectors; sector_t nr_sectors;
u32 nr_zones; u32 nr_zones;
...@@ -503,7 +502,6 @@ int btrfs_sb_log_location_bdev(struct block_device *bdev, int mirror, int rw, ...@@ -503,7 +502,6 @@ int btrfs_sb_log_location_bdev(struct block_device *bdev, int mirror, int rw,
zone_sectors = bdev_zone_sectors(bdev); zone_sectors = bdev_zone_sectors(bdev);
if (!is_power_of_2(zone_sectors)) if (!is_power_of_2(zone_sectors))
return -EINVAL; return -EINVAL;
zone_size = zone_sectors << SECTOR_SHIFT;
zone_sectors_shift = ilog2(zone_sectors); zone_sectors_shift = ilog2(zone_sectors);
nr_sectors = bdev_nr_sectors(bdev); nr_sectors = bdev_nr_sectors(bdev);
nr_zones = nr_sectors >> zone_sectors_shift; nr_zones = nr_sectors >> zone_sectors_shift;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment