summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/page-writeback.c11
-rw-r--r--mm/page_io.c4
2 files changed, 4 insertions, 11 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 4557a8d3dfea..0997738545dd 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -2641,15 +2641,10 @@ bool folio_mark_dirty(struct folio *folio)
*/
if (folio_test_reclaim(folio))
folio_clear_reclaim(folio);
- if (mapping->a_ops->dirty_folio)
- return mapping->a_ops->dirty_folio(mapping, folio);
- return mapping->a_ops->set_page_dirty(&folio->page);
+ return mapping->a_ops->dirty_folio(mapping, folio);
}
- if (!folio_test_dirty(folio)) {
- if (!folio_test_set_dirty(folio))
- return true;
- }
- return false;
+
+ return noop_dirty_folio(mapping, folio);
}
EXPORT_SYMBOL(folio_mark_dirty);
diff --git a/mm/page_io.c b/mm/page_io.c
index e3333973335e..6bde053b9d9d 100644
--- a/mm/page_io.c
+++ b/mm/page_io.c
@@ -449,9 +449,7 @@ bool swap_dirty_folio(struct address_space *mapping, struct folio *folio)
aops = mapping->a_ops;
VM_BUG_ON_FOLIO(!folio_test_swapcache(folio), folio);
- if (aops->dirty_folio)
- return aops->dirty_folio(mapping, folio);
- return aops->set_page_dirty(&folio->page);
+ return aops->dirty_folio(mapping, folio);
} else {
return noop_dirty_folio(mapping, folio);
}