projects
/
kernel
/
kernel-generic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
00d71c9
)
Btrfs: check for NULL pointer in updating reloc roots
author
Liu Bo
<bo.li.liu@oracle.com>
Mon, 4 Mar 2013 16:25:36 +0000
(16:25 +0000)
committer
Josef Bacik
<jbacik@fusionio.com>
Mon, 4 Mar 2013 21:33:22 +0000
(16:33 -0500)
Add a check for NULL pointer to avoid invalid reference.
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/relocation.c
patch
|
blob
|
history
diff --git
a/fs/btrfs/relocation.c
b/fs/btrfs/relocation.c
index
ba5a321
..
16e0c6f
100644
(file)
--- a/
fs/btrfs/relocation.c
+++ b/
fs/btrfs/relocation.c
@@
-1269,6
+1269,8
@@
static int __update_reloc_root(struct btrfs_root *root, int del)
}
spin_unlock(&rc->reloc_root_tree.lock);
+ if (!node)
+ return 0;
BUG_ON((struct btrfs_root *)node->data != root);
if (!del) {