From: Ilya Dryomov Date: Sun, 2 Oct 2011 10:56:53 +0000 (+0300) Subject: Btrfs: pass the correct root to lookup_free_space_inode() X-Git-Tag: v2.6.39-400.9.0~845^2~43 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=97806a0adc47f0683fbe1f2cb6664b33e0ce279a;p=users%2Fjedix%2Flinux-maple.git Btrfs: pass the correct root to lookup_free_space_inode() Free space items are located in tree of tree roots, not in the extent tree. It didn't pop up because lookup_free_space_inode() grabs the inode all the time instead of actually searching the tree. Signed-off-by: Ilya Dryomov (cherry picked from commit 10b2f34d6e7fbe07f498cb2006272e9a561f5e60) --- diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index bd9d28e856c8..191d7db475d3 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -7312,7 +7312,7 @@ int btrfs_remove_block_group(struct btrfs_trans_handle *trans, goto out; } - inode = lookup_free_space_inode(root, block_group, path); + inode = lookup_free_space_inode(tree_root, block_group, path); if (!IS_ERR(inode)) { ret = btrfs_orphan_add(trans, inode); BUG_ON(ret);