Skip to contentSkip to conversation

ntfs: Remove repeated uptodate check for buffer

PATCH New Wan Jiabing 1 participant 1 message Apr 25, 2021 NTFS filesystem

lore
Share & tools
lore
#0 lore raw

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.

---
 fs/ntfs/logfile.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
fs/ntfs/logfile.c +1 -2
index bc1bf217b38e..9695540ce581 100644
@@ -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