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