git.samba.org
/
sfrench
/
cifs-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
bcache: check return value from btree_node_alloc_replacement()
[sfrench/cifs-2.6.git]
/
drivers
/
md
/
bcache
/
btree.c
diff --git
a/drivers/md/bcache/btree.c
b/drivers/md/bcache/btree.c
index ae5cbb55861fdb7967ad9ad686161b377de345b4..de8d552201dc3dcb053e34a731f3c43edda0b15f 100644
(file)
--- a/
drivers/md/bcache/btree.c
+++ b/
drivers/md/bcache/btree.c
@@
-1532,6
+1532,8
@@
static int btree_gc_rewrite_node(struct btree *b, struct btree_op *op,
return 0;
n = btree_node_alloc_replacement(replace, NULL);
+ if (IS_ERR(n))
+ return 0;
/* recheck reserve after allocating replacement node */
if (btree_check_reserve(b, NULL)) {