ntfs: Remove repeated uptodate check for buffer
PATCH 1/1 ntfs: Remove repeated uptodate check for buffer
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 <[email protected]>
--- fs/ntfs/logfile.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
fs/ntfs/logfile.c +1 -2
@@ -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);/*
Signature · 1 line
2.25.1