diff options
author | Filipe Manana <fdmanana@suse.com> | 2024-02-13 00:50:53 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2024-02-13 20:38:19 +0300 |
commit | 88e81a67773017a2b93f6d5fe7c78bb0c5a6e4dd (patch) | |
tree | dfc87ddb3c57ac49f85bc68d237b84fdc17361f1 /fs | |
parent | 1bd96c92c6a0a4d43815eb685c15aa4b78879dc9 (diff) | |
download | linux-88e81a67773017a2b93f6d5fe7c78bb0c5a6e4dd.tar.xz |
btrfs: zoned: fix chunk map leak when loading block group zone info
At btrfs_load_block_group_zone_info() we never drop a reference on the
chunk map we have looked up, therefore leaking a reference on it. So
add the missing btrfs_free_chunk_map() at the end of the function.
Fixes: 7dc66abb5a47 ("btrfs: use a dedicated data structure for chunk maps")
Reported-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Tested-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/zoned.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/zoned.c b/fs/btrfs/zoned.c index ac9bbe0c4ffe..afeb1dc1f43a 100644 --- a/fs/btrfs/zoned.c +++ b/fs/btrfs/zoned.c @@ -1687,6 +1687,7 @@ out: } bitmap_free(active); kfree(zone_info); + btrfs_free_chunk_map(map); return ret; } |