Commit 01f01399 authored by Wan Jiabing's avatar Wan Jiabing Committed by Linus Torvalds

ocfs2: remove repeated uptodate check for buffer

In commit 60f91826 ("buffer: Avoid setting buffer bits that are
already set"), function set_buffer_##name was added a test_bit() to check
buffer, which is the same as function buffer_##name.  The
!buffer_uptodate(bh) here is a repeated check.  Remove it.

Link: https://lkml.kernel.org/r/20210425025702.13628-1-wanjiabing@vivo.comSigned-off-by: default avatarWan Jiabing <wanjiabing@vivo.com>
Reviewed-by: default avatarJoseph Qi <joseph.qi@linux.alibaba.com>
Cc: Mark Fasheh <mark@fasheh.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Cc: Changwei Ge <gechangwei@live.cn>
Cc: Gang He <ghe@suse.com>
Cc: Jun Piao <piaojun@huawei.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent ca49b6d8
...@@ -632,7 +632,6 @@ int ocfs2_map_page_blocks(struct page *page, u64 *p_blkno, ...@@ -632,7 +632,6 @@ int ocfs2_map_page_blocks(struct page *page, u64 *p_blkno,
} }
if (PageUptodate(page)) { if (PageUptodate(page)) {
if (!buffer_uptodate(bh))
set_buffer_uptodate(bh); set_buffer_uptodate(bh);
} else if (!buffer_uptodate(bh) && !buffer_delay(bh) && } else if (!buffer_uptodate(bh) && !buffer_delay(bh) &&
!buffer_new(bh) && !buffer_new(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