diff mbox

Btrfs: make sure we call recalculate_thresholds() in btrfs_remove_free_space()

Message ID 20110225121606.GA4248@Archlinux (mailing list archive)
State New, archived
Headers show

Commit Message

Li Dongyang Feb. 25, 2011, 12:16 p.m. UTC
None
diff mbox

Patch

diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
index a039065..f631817 100644
--- a/fs/btrfs/free-space-cache.c
+++ b/fs/btrfs/free-space-cache.c
@@ -1515,12 +1515,12 @@  again:
 	}
 
 	if (info->bytes == bytes) {
-		unlink_free_space(block_group, info);
-		if (info->bitmap) {
-			kfree(info->bitmap);
-			block_group->total_bitmaps--;
+		if (info->bitmap)
+			free_bitmap(block_group, info);
+		else {
+			unlink_free_space(block_group, info);
+			kfree(info);
 		}
-		kfree(info);
 		goto out_lock;
 	}