summaryrefslogtreecommitdiffstats
path: root/mm/folio-compat.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2021-05-03 23:30:44 -0400
committerMatthew Wilcox (Oracle) <willy@infradead.org>2021-10-18 07:49:39 -0400
commit85d4d2ebc86f02740c5f5f72ec43cc47d3560720 (patch)
tree1728447a3f37ad4f8669ffaf4346f9e43e41ccde /mm/folio-compat.c
parentb9b0ff61eef51469eae962b80bae094ce2c8c2a5 (diff)
downloadlinux-stable-85d4d2ebc86f02740c5f5f72ec43cc47d3560720.tar.gz
linux-stable-85d4d2ebc86f02740c5f5f72ec43cc47d3560720.tar.bz2
linux-stable-85d4d2ebc86f02740c5f5f72ec43cc47d3560720.zip
mm/writeback: Add filemap_dirty_folio()
Reimplement __set_page_dirty_nobuffers() as a wrapper around filemap_dirty_folio(). Eventually folio_mark_dirty() will pass the folio's mapping to the address space's ->dirty_folio() operation, so add the parameter to filemap_dirty_folio() now. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: David Howells <dhowells@redhat.com> Acked-by: Vlastimil Babka <vbabka@suse.cz>
Diffstat (limited to 'mm/folio-compat.c')
-rw-r--r--mm/folio-compat.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/mm/folio-compat.c b/mm/folio-compat.c
index 2c2b3917b5dc..dad962b920e5 100644
--- a/mm/folio-compat.c
+++ b/mm/folio-compat.c
@@ -83,3 +83,9 @@ bool set_page_dirty(struct page *page)
return folio_mark_dirty(page_folio(page));
}
EXPORT_SYMBOL(set_page_dirty);
+
+int __set_page_dirty_nobuffers(struct page *page)
+{
+ return filemap_dirty_folio(page_mapping(page), page_folio(page));
+}
+EXPORT_SYMBOL(__set_page_dirty_nobuffers);