mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-01 14:44:12 +00:00
bcache: avoid NULL checking to c->root in run_cache_set()
[ Upstream commit 3eba5e0b24
]
In run_cache_set() after c->root returned from bch_btree_node_get(), it
is checked by IS_ERR_OR_NULL(). Indeed it is unncessary to check NULL
because bch_btree_node_get() will not return NULL pointer to caller.
This patch replaces IS_ERR_OR_NULL() by IS_ERR() for the above reason.
Signed-off-by: Coly Li <colyli@suse.de>
Link: https://lore.kernel.org/r/20231120052503.6122-11-colyli@suse.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
286918928e
commit
4a4bba9f04
1 changed files with 1 additions and 1 deletions
|
@ -2017,7 +2017,7 @@ static int run_cache_set(struct cache_set *c)
|
|||
c->root = bch_btree_node_get(c, NULL, k,
|
||||
j->btree_level,
|
||||
true, NULL);
|
||||
if (IS_ERR_OR_NULL(c->root))
|
||||
if (IS_ERR(c->root))
|
||||
goto err;
|
||||
|
||||
list_del_init(&c->root->list);
|
||||
|
|
Loading…
Reference in a new issue