• L
    Btrfs: fix memory leak of empty filesystem after balance · 9f7c43c9
    liubo 提交于
    After Josef's patch(commit 3c14874a),
    btrfs will exclude super bytes when reading block groups(by marking a extent
    state UPTODATE).  However, these bytes do not get freed while balance remove
    unused block groups, and we won't process those removed ones any more, when
    we do umount and unload the btrfs module,  btrfs hits a memory leak.
    
    This patch add the missing free operation.
    
    Reproduce steps:
    $ mkfs.btrfs disk
    $ mount disk /mnt/btrfs -o loop
    $ btrfs filesystem balance /mnt/btrfs
    $ umount /mnt/btrfs
    $ rmmod btrfs
    Signed-off-by: NLiu Bo <liubo2009@cn.fujitsu.com>
    Signed-off-by: NChris Mason <chris.mason@oracle.com>
    9f7c43c9
extent-tree.c 230.5 KB