projects
/
GitHub
/
LineageOS
/
android_kernel_samsung_universal7580.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3e74317
)
Btrfs: Prevent root_list corruption
author
Daniel J Blueman
<daniel@quora.org>
Fri, 27 Apr 2012 16:41:46 +0000
(12:41 -0400)
committer
Chris Mason
<chris.mason@oracle.com>
Fri, 27 Apr 2012 17:55:13 +0000
(13:55 -0400)
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>
fs/btrfs/relocation.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/btrfs/relocation.c
b/fs/btrfs/relocation.c
index 017281dbb2a71f6a0c51f4f8cc52cf9e651f2fd0..5a105a086acfea61bcb3b326335b8371dda00bfd 100644
(file)
--- a/
fs/btrfs/relocation.c
+++ b/
fs/btrfs/relocation.c
@@
-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;