Btrfs: free bitmaps properly when evicting the cache
authorJosef Bacik <josef@redhat.com>
Mon, 25 Apr 2011 23:43:52 +0000 (19:43 -0400)
committerChris Mason <chris.mason@oracle.com>
Mon, 25 Apr 2011 23:43:52 +0000 (19:43 -0400)
commita4f0162fd4490daf2c823c185fff79080d266a7c
treec2a7186103a4b31115eb10555864620a46a18ad9
parentf789b684bdb96e7ec2fce79445555d4fd55fb94c
Btrfs: free bitmaps properly when evicting the cache

If our space cache is wrong, we do the right thing and free up everything that
we loaded, however we don't reset the total_bitmaps counter or the thresholds or
anything.  So in btrfs_remove_free_space_cache make sure to call free_bitmap()
if it's a bitmap, this will keep us from panicing when we check to make sure we
don't have too many bitmaps.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/free-space-cache.c