[PATCH] mm: remove redundant if overhead

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Remove redundant if judgment overhead.

Signed-off-by: Zhiguo Jiang <justinjiang@xxxxxxxx>
---
 mm/page-writeback.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index fcd4c1439cb9..2d2c3f4e640d
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -2715,9 +2715,7 @@ int do_writepages(struct address_space *mapping, struct writeback_control *wbc)
  */
 bool noop_dirty_folio(struct address_space *mapping, struct folio *folio)
 {
-	if (!folio_test_dirty(folio))
-		return !folio_test_set_dirty(folio);
-	return false;
+	return !folio_test_set_dirty(folio);
 }
 EXPORT_SYMBOL(noop_dirty_folio);
 
-- 
2.39.0





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux