Commit 5c680150 authored by Joseph Qi's avatar Joseph Qi Committed by Theodore Ts'o

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: default avatarRitesh Harjani <riteshh@linux.ibm.com>
Signed-off-by: default avatarJoseph Qi <joseph.qi@linux.alibaba.com>
Link: https://lore.kernel.org/r/1619418587-5580-1-git-send-email-joseph.qi@linux.alibaba.comSigned-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
parent d0b040f5
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment