diff options
author | Liu Bo <bo.li.liu@oracle.com> | 2016-07-20 00:36:05 +0200 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2016-08-25 12:58:15 +0200 |
commit | 1c1ea4f781db9f754842b9c31d1eff400d17cddc (patch) | |
tree | 7e14ac7f74054a5d5912b2fd0db38abcf73e9a4d /ipc/compat_mq.c | |
parent | Merge branch 'integration-4.8' of git://git.kernel.org/pub/scm/linux/kernel/g... (diff) | |
download | linux-1c1ea4f781db9f754842b9c31d1eff400d17cddc.tar.xz linux-1c1ea4f781db9f754842b9c31d1eff400d17cddc.zip |
Btrfs: fix memory leak of reloc_root
When some critical errors occur and FS would be flipped into RO,
if we have an on-going balance, we can end up with a memory leak
of root->reloc_root since btrfs_drop_snapshots() bails out
without freeing reloc_root at the very early start.
However, we're not able to free reloc_root in btrfs_drop_snapshots()
because its caller, merge_reloc_roots(), still needs to access it to
cleanup reloc_root's rbtree.
This makes us free reloc_root when we're going to free fs/file roots.
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'ipc/compat_mq.c')
0 files changed, 0 insertions, 0 deletions