diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2022-10-22 22:59:53 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:09:45 +0300 |
commit | a10195764901e0a41e64d596de57a957e7f982f0 (patch) | |
tree | fec47a1ad4a508d47299715baabf7a7242ddf90b /fs/bcachefs/btree_cache.c | |
parent | d4bce63636ab81ca4aed03d6641ad70c8416e921 (diff) | |
download | linux-a10195764901e0a41e64d596de57a957e7f982f0.tar.xz |
bcachefs: More style fixes
Fixes for various checkpatch errors.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/btree_cache.c')
-rw-r--r-- | fs/bcachefs/btree_cache.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/bcachefs/btree_cache.c b/fs/bcachefs/btree_cache.c index 709453a909fc..5adfdc5afbea 100644 --- a/fs/bcachefs/btree_cache.c +++ b/fs/bcachefs/btree_cache.c @@ -112,7 +112,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; @@ -128,7 +130,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; @@ -147,6 +151,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: */ |