]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
bcache: avoid NULL checking to c->root in run_cache_set()
authorColy Li <colyli@suse.de>
Mon, 20 Nov 2023 05:25:03 +0000 (13:25 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Dec 2023 14:17:40 +0000 (15:17 +0100)
commit7020385effce2a3551060afe6ef63fcf367dbf31
tree0f796238cfee51a684caf820ba3960ff58d6c4c5
parentf891bbf13a94b59880b4ff874be17f08dc3c8745
bcache: avoid NULL checking to c->root in run_cache_set()

[ Upstream commit 3eba5e0b2422aec3c9e79822029599961fdcab97 ]

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>
drivers/md/bcache/super.c