[PATCH] ntfs: Remove repeated uptodate check for buffer

From: Wan Jiabing
Date: Sat Apr 24 2021 - 23:02:44 EST


In commit 60f91826ca62 ("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.

Signed-off-by: Wan Jiabing <wanjiabing@xxxxxxxx>
---
fs/ntfs/logfile.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/ntfs/logfile.c b/fs/ntfs/logfile.c
index bc1bf217b38e..9695540ce581 100644
--- a/fs/ntfs/logfile.c
+++ b/fs/ntfs/logfile.c
@@ -796,8 +796,7 @@ bool ntfs_empty_logfile(struct inode *log_vi)
get_bh(bh);
/* Set the entire contents of the buffer to 0xff. */
memset(bh->b_data, -1, block_size);
- if (!buffer_uptodate(bh))
- set_buffer_uptodate(bh);
+ set_buffer_uptodate(bh);
if (buffer_dirty(bh))
clear_buffer_dirty(bh);
/*
--
2.25.1