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 16:01:56 +0000 (17:01 +0100)
commit4a4bba9f0470d0cb6afd8c8e880b04567585f542
tree8d72bf17c08047f7c1d1c01dba3c7b5570709a03
parent286918928ed7094d53e6fd08513e4a3f1a09f1d0
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