The patch titled Subject: nilfs2: delete unnecessary checks before brelse() has been added to the -mm mm-nonmm-unstable branch. Its filename is nilfs2-delete-unnecessary-checks-before-brelse.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/nilfs2-delete-unnecessary-checks-before-brelse.patch This patch will later appear in the mm-nonmm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Minghao Chi <chi.minghao@xxxxxxxxxx> Subject: nilfs2: delete unnecessary checks before brelse() Date: Wed, 21 Sep 2022 12:48:02 +0900 Patch series "nilfs2 minor amendments". This patch (of 2): The brelse() inline function tests whether its argument is NULL and then returns immediately. Thus remove the tests which are not needed around the shown calls. Link: https://lkml.kernel.org/r/20220921034803.2476-1-konishi.ryusuke@xxxxxxxxx Link: https://lkml.kernel.org/r/20220819081700.96279-1-chi.minghao@xxxxxxxxxx Link: https://lkml.kernel.org/r/20220921034803.2476-2-konishi.ryusuke@xxxxxxxxx Reported-by: Zeal Robot <zealci@xxxxxxxxxx> Signed-off-by: Minghao Chi <chi.minghao@xxxxxxxxxx> Signed-off-by: Ryusuke Konishi <konishi.ryusuke@xxxxxxxxx> Cc: ye xingchen <ye.xingchen@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- --- a/fs/nilfs2/btree.c~nilfs2-delete-unnecessary-checks-before-brelse +++ a/fs/nilfs2/btree.c @@ -1668,8 +1668,7 @@ static int nilfs_btree_check_delete(stru maxkey = nilfs_btree_node_get_key(node, nchildren - 1); nextmaxkey = (nchildren > 1) ? nilfs_btree_node_get_key(node, nchildren - 2) : 0; - if (bh != NULL) - brelse(bh); + brelse(bh); return (maxkey == key) && (nextmaxkey < NILFS_BMAP_LARGE_LOW); } @@ -1717,8 +1716,7 @@ static int nilfs_btree_gather_data(struc ptrs[i] = le64_to_cpu(dptrs[i]); } - if (bh != NULL) - brelse(bh); + brelse(bh); return nitems; } _ Patches currently in -mm which might be from chi.minghao@xxxxxxxxxx are nilfs2-delete-unnecessary-checks-before-brelse.patch