diff options
author | Josef Bacik <jbacik@fb.com> | 2016-08-18 22:30:06 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-01-17 00:16:06 +0300 |
commit | 4bf414d2ff5758d64d4c785339c92ba22af979c3 (patch) | |
tree | 1a53a50d9f644ab1d75391735db2e0d0b564374c /fs/btrfs | |
parent | a155ec93222648115e6cdf64a1ca6a929c8a66f1 (diff) | |
download | linux-4bf414d2ff5758d64d4c785339c92ba22af979c3.tar.xz |
Btrfs: fix em leak in find_first_block_group
commit 187ee58c62c1d0d238d3dc4835869d33e1869906 upstream.
We need to call free_extent_map() on the em we look up.
Signed-off-by: Josef Bacik <jbacik@fb.com>
Reviewed-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Chris Mason <clm@fb.com>
Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/extent-tree.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 2b7cba4fc8f1..abfd2320873d 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -9518,6 +9518,7 @@ static int find_first_block_group(struct btrfs_root *root, } else { ret = 0; } + free_extent_map(em); goto out; } path->slots[0]++; |