Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

reiserfs: Remove unneed check in reiserfs_write_full_page()

Condition !A || A && B is equivalent to !A || B.

Generated by: scripts/coccinelle/misc/excluded_middle.cocci

Link: https://lore.kernel.org/r/20210523090258.27696-1-yuehaibing@huawei.com
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Jan Kara <jack@suse.cz>

authored by

YueHaibing and committed by
Jan Kara
21e4e15a fa236c2b

+1 -3
+1 -3
fs/reiserfs/inode.c
··· 2584 2584 clear_buffer_dirty(bh); 2585 2585 set_buffer_uptodate(bh); 2586 2586 } else if ((checked || buffer_dirty(bh)) && 2587 - (!buffer_mapped(bh) || (buffer_mapped(bh) 2588 - && bh->b_blocknr == 2589 - 0))) { 2587 + (!buffer_mapped(bh) || bh->b_blocknr == 0)) { 2590 2588 /* 2591 2589 * not mapped yet, or it points to a direct item, search 2592 2590 * the btree for the mapping info, and log any direct