Skip to content

Commit

Permalink
Btrfs: pass the correct root to lookup_free_space_inode()
Browse files Browse the repository at this point in the history
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 <idryomov@gmail.com>
  • Loading branch information
Ilya Dryomov authored and David Sterba committed Oct 20, 2011
1 parent fee187d commit 10b2f34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/btrfs/extent-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 10b2f34

Please sign in to comment.