Patch "bcache: avoid NULL checking to c->root in run_cache_set()" has been added to the 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    bcache: avoid NULL checking to c->root in run_cache_set()

to the 5.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     bcache-avoid-null-checking-to-c-root-in-run_cache_se.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 7e4b9ee33cd12e8f154e9b3570e82258fc5658fb
Author: Coly Li <colyli@xxxxxxx>
Date:   Mon Nov 20 13:25:03 2023 +0800

    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@xxxxxxx>
    Link: https://lore.kernel.org/r/20231120052503.6122-11-colyli@xxxxxxx
    Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c
index d5f57a9551dda..5d1a4eb816694 100644
--- a/drivers/md/bcache/super.c
+++ b/drivers/md/bcache/super.c
@@ -1908,7 +1908,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);




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux