Skip to content

Commit

Permalink
Btrfs: Prevent root_list corruption
Browse files Browse the repository at this point in the history
I was seeing root_list corruption on unmount during fs resize in 3.4-rc4; add
correct locking to address this.

Signed-off-by: Daniel J Blueman <daniel@quora.org>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
  • Loading branch information
Daniel J Blueman authored and Chris Mason committed Apr 27, 2012
1 parent 3e74317 commit 1daf354
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/btrfs/relocation.c
Original file line number Diff line number Diff line change
Expand Up @@ -1279,7 +1279,9 @@ static int __update_reloc_root(struct btrfs_root *root, int del)
if (rb_node)
backref_tree_panic(rb_node, -EEXIST, node->bytenr);
} else {
spin_lock(&root->fs_info->trans_lock);
list_del_init(&root->root_list);
spin_unlock(&root->fs_info->trans_lock);
kfree(node);
}
return 0;
Expand Down

0 comments on commit 1daf354

Please sign in to comment.