nilfs2: delete unnecessary checks before brelse()
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@gmail.com Link: https://lkml.kernel.org/r/20220819081700.96279-1-chi.minghao@zte.com.cn Link: https://lkml.kernel.org/r/20220921034803.2476-2-konishi.ryusuke@gmail.com Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn> Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com> Cc: ye xingchen <ye.xingchen@zte.com.cn> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
bd17e036b4
commit
0badb2e46a
@ -1668,7 +1668,6 @@ static int nilfs_btree_check_delete(struct nilfs_bmap *btree, __u64 key)
|
|||||||
maxkey = nilfs_btree_node_get_key(node, nchildren - 1);
|
maxkey = nilfs_btree_node_get_key(node, nchildren - 1);
|
||||||
nextmaxkey = (nchildren > 1) ?
|
nextmaxkey = (nchildren > 1) ?
|
||||||
nilfs_btree_node_get_key(node, nchildren - 2) : 0;
|
nilfs_btree_node_get_key(node, nchildren - 2) : 0;
|
||||||
if (bh != NULL)
|
|
||||||
brelse(bh);
|
brelse(bh);
|
||||||
|
|
||||||
return (maxkey == key) && (nextmaxkey < NILFS_BMAP_LARGE_LOW);
|
return (maxkey == key) && (nextmaxkey < NILFS_BMAP_LARGE_LOW);
|
||||||
@ -1717,7 +1716,6 @@ static int nilfs_btree_gather_data(struct nilfs_bmap *btree,
|
|||||||
ptrs[i] = le64_to_cpu(dptrs[i]);
|
ptrs[i] = le64_to_cpu(dptrs[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bh != NULL)
|
|
||||||
brelse(bh);
|
brelse(bh);
|
||||||
|
|
||||||
return nitems;
|
return nitems;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user