@@ -692,19 +692,16 @@ static pageout_t pageout(struct folio *folio, struct address_space *mapping,
if (shmem_mapping(mapping) && folio_test_large(folio))
wbc.list = folio_list;
- folio_set_reclaim(folio);
+ folio_set_dropbehind(folio);
+
res = mapping->a_ops->writepage(&folio->page, &wbc);
if (res < 0)
handle_write_error(mapping, folio, res);
if (res == AOP_WRITEPAGE_ACTIVATE) {
- folio_clear_reclaim(folio);
+ folio_clear_dropbehind(folio);
return PAGE_ACTIVATE;
}
- if (!folio_test_writeback(folio)) {
- /* synchronous write or broken a_ops? */
- folio_clear_reclaim(folio);
- }
trace_mm_vmscan_write_folio(folio);
node_stat_add_folio(folio, NR_VMSCAN_WRITE);
return PAGE_SUCCESS;