aboutsummaryrefslogtreecommitdiffstats
path: root/lib/btree.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/btree.c')
-rw-r--r--lib/btree.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/btree.c b/lib/btree.c
index 41859a820218..c9c6f0351526 100644
--- a/lib/btree.c
+++ b/lib/btree.c
@@ -95,7 +95,8 @@ static unsigned long *btree_node_alloc(struct btree_head *head, gfp_t gfp)
95 unsigned long *node; 95 unsigned long *node;
96 96
97 node = mempool_alloc(head->mempool, gfp); 97 node = mempool_alloc(head->mempool, gfp);
98 memset(node, 0, NODESIZE); 98 if (likely(node))
99 memset(node, 0, NODESIZE);
99 return node; 100 return node;
100} 101}
101 102