]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - libbcachefs/btree_cache.c
Update bcachefs sources to 70fa0c1ff4 fixup! bcachefs: Btree key cache improvements
[bcachefs-tools-debian] / libbcachefs / btree_cache.c
index 8dd2db4121a6b57db2a2c20fa4c9f3e0ad781428..d1cbf9266fb4ebfb065cda1475179d352f31816d 100644 (file)
@@ -118,7 +118,9 @@ static int btree_node_data_alloc(struct bch_fs *c, struct btree *b, gfp_t gfp)
 
 static struct btree *__btree_node_mem_alloc(struct bch_fs *c, gfp_t gfp)
 {
-       struct btree *b = kzalloc(sizeof(struct btree), gfp);
+       struct btree *b;
+
+       b = kzalloc(sizeof(struct btree), gfp);
        if (!b)
                return NULL;
 
@@ -136,7 +138,9 @@ static struct btree *__btree_node_mem_alloc(struct bch_fs *c, gfp_t gfp)
 struct btree *__bch2_btree_node_mem_alloc(struct bch_fs *c)
 {
        struct btree_cache *bc = &c->btree_cache;
-       struct btree *b = __btree_node_mem_alloc(c, GFP_KERNEL);
+       struct btree *b;
+
+       b = __btree_node_mem_alloc(c, GFP_KERNEL);
        if (!b)
                return NULL;
 
@@ -155,6 +159,7 @@ struct btree *__bch2_btree_node_mem_alloc(struct bch_fs *c)
 void bch2_btree_node_hash_remove(struct btree_cache *bc, struct btree *b)
 {
        int ret = rhashtable_remove_fast(&bc->table, &b->hash, bch_btree_cache_params);
+
        BUG_ON(ret);
 
        /* Cause future lookups for this node to fail: */