From: Joseph Qi Date: Mon, 26 Apr 2021 06:29:47 +0000 (+0800) Subject: ext4: remove redundant check buffer_uptodate() X-Git-Tag: v5.15~760^2~36 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5c680150d7f43484fde6b87271229f2206bfff7c;p=platform%2Fkernel%2Flinux-starfive.git ext4: remove redundant check buffer_uptodate() Now set_buffer_uptodate() will test first and then set, so we don't have to check buffer_uptodate() first, remove it to simplify code. Reviewed-by: Ritesh Harjani Signed-off-by: Joseph Qi Link: https://lore.kernel.org/r/1619418587-5580-1-git-send-email-joseph.qi@linux.alibaba.com Signed-off-by: Theodore Ts'o --- diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index 37002663..639ab54 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -3784,7 +3784,7 @@ static inline int ext4_buffer_uptodate(struct buffer_head *bh) * have to read the block because we may read the old data * successfully. */ - if (!buffer_uptodate(bh) && buffer_write_io_error(bh)) + if (buffer_write_io_error(bh)) set_buffer_uptodate(bh); return buffer_uptodate(bh); }