diff --git a/patches.suse/bcache-avoid-NULL-checking-to-c-root-in-run_cache_se-3eba.patch b/patches.suse/bcache-avoid-NULL-checking-to-c-root-in-run_cache_se-3eba.patch new file mode 100644 index 0000000..8e8eaef --- /dev/null +++ b/patches.suse/bcache-avoid-NULL-checking-to-c-root-in-run_cache_se-3eba.patch @@ -0,0 +1,38 @@ +From 3eba5e0b2422aec3c9e79822029599961fdcab97 Mon Sep 17 00:00:00 2001 +From: Coly Li +Date: Mon, 20 Nov 2023 13:25:03 +0800 +Subject: [PATCH] bcache: avoid NULL checking to c->root in run_cache_set() +Git-commit: 3eba5e0b2422aec3c9e79822029599961fdcab97 +Patch-mainline: v6.7-rc3 +References: git-fixes + +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 +Link: https://lore.kernel.org/r/20231120052503.6122-11-colyli@suse.de +Signed-off-by: Jens Axboe + +--- + drivers/md/bcache/super.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c +index c7ecc7058d77..bfe1685dbae5 100644 +--- a/drivers/md/bcache/super.c ++++ b/drivers/md/bcache/super.c +@@ -2018,7 +2018,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); +-- +2.35.3 + diff --git a/series.conf b/series.conf index b6232eb..79c4f81 100644 --- a/series.conf +++ b/series.conf @@ -44851,6 +44851,7 @@ patches.suse/bcache-fixup-multi-threaded-bch_sectors_dirty_init-w-2faa.patch patches.suse/bcache-replace-a-mistaken-IS_ERR-by-IS_ERR_OR_NULL-i-f72f.patch patches.suse/bcache-add-code-comments-for-bch_btree_node_get-and--31f5.patch + patches.suse/bcache-avoid-NULL-checking-to-c-root-in-run_cache_se-3eba.patch patches.suse/md-fix-bi_status-reporting-in-md_end_clone_io-45b4.patch patches.suse/s390-dasd-protect-device-queue-against-concurrent-access.patch patches.suse/nvmet-nul-terminate-the-NQNs-passed-in-the-connect-c.patch