]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
btrfs: zoned: use local fs_info variable in btrfs_load_block_group_dup()
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>
Fri, 23 Jan 2026 08:14:44 +0000 (09:14 +0100)
committerDavid Sterba <dsterba@suse.com>
Tue, 3 Feb 2026 06:56:23 +0000 (07:56 +0100)
btrfs_load_block_group_dup() has a local pointer to fs_info, yet the
error prints dereference fs_info from the block_group.

Use local fs_info variable to make the code more uniform.

Reviewed-by: Daniel Vacek <neelx@suse.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Naohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/zoned.c

index 7fa60a44d71666796ce1ab50155cfc817ae43d68..b792136e3d08211ede320be0510859af7d6b0a64 100644 (file)
@@ -1438,13 +1438,13 @@ static int btrfs_load_block_group_dup(struct btrfs_block_group *bg,
        bg->zone_capacity = min_not_zero(zone_info[0].capacity, zone_info[1].capacity);
 
        if (unlikely(zone_info[0].alloc_offset == WP_MISSING_DEV)) {
-               btrfs_err(bg->fs_info,
+               btrfs_err(fs_info,
                          "zoned: cannot recover write pointer for zone %llu",
                          zone_info[0].physical);
                return -EIO;
        }
        if (unlikely(zone_info[1].alloc_offset == WP_MISSING_DEV)) {
-               btrfs_err(bg->fs_info,
+               btrfs_err(fs_info,
                          "zoned: cannot recover write pointer for zone %llu",
                          zone_info[1].physical);
                return -EIO;
@@ -1471,7 +1471,7 @@ static int btrfs_load_block_group_dup(struct btrfs_block_group *bg,
                zone_info[1].alloc_offset = last_alloc;
 
        if (unlikely(zone_info[0].alloc_offset != zone_info[1].alloc_offset)) {
-               btrfs_err(bg->fs_info,
+               btrfs_err(fs_info,
                          "zoned: write pointer offset mismatch of zones in DUP profile");
                return -EIO;
        }