aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-08-04 23:17:26 -0400
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:04:06 -0400
commitd7a029a89ef370e74b63f18b81498d90d1ee3cc1 (patch)
tree455f0cede97142d447902d8ba5c16a5710649f26
parent9ca9ee09c176a814189063c8b88f75c8f8e4ad19 (diff)
Btrfs: Don't corrupt ram in shrink_extent_tree, leak it instead
Far from the perfect fix, but these structs are small. TODO for the next release. The block group cache structs are referenced in many different places, and it isn't safe to just free them while resizing. A real fix will be a larger change to the allocator so that it doesn't have to carry about the block group cache structs to find good places to search for free blocks. Signed-off-by: Chris Mason <chris.mason@oracle.com>
-rw-r--r--fs/btrfs/extent-tree.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 1aeb695078b9..dbde12881244 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -3437,8 +3437,10 @@ next:
3437 key.objectid, key.objectid + key.offset - 1, 3437 key.objectid, key.objectid + key.offset - 1,
3438 (unsigned int)-1, GFP_NOFS); 3438 (unsigned int)-1, GFP_NOFS);
3439 3439
3440 /*
3440 memset(shrink_block_group, 0, sizeof(*shrink_block_group)); 3441 memset(shrink_block_group, 0, sizeof(*shrink_block_group));
3441 kfree(shrink_block_group); 3442 kfree(shrink_block_group);
3443 */
3442 3444
3443 btrfs_del_item(trans, root, path); 3445 btrfs_del_item(trans, root, path);
3444 btrfs_release_path(root, path); 3446 btrfs_release_path(root, path);