diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2021-03-01 00:21:20 +0300 |
---|---|---|
committer | Matthew Wilcox (Oracle) <willy@infradead.org> | 2021-10-18 14:49:40 +0300 |
commit | 9350f20a070d27a6c6a292a2b6f6091e7ea90a65 (patch) | |
tree | 546c418745f6b90cc70ae9b7760b33153e1fdf18 /include/linux/pagemap.h | |
parent | fdaf532a23795e320c47e1caab50a53c202135c5 (diff) | |
download | linux-9350f20a070d27a6c6a292a2b6f6091e7ea90a65.tar.xz |
mm/writeback: Add folio_clear_dirty_for_io()
Transform clear_page_dirty_for_io() into folio_clear_dirty_for_io()
and add a compatibility wrapper. Also move the declaration to pagemap.h
as this is page cache functionality that doesn't need to be used by the
rest of the kernel.
Increases the size of the kernel by 79 bytes. While we remove a few
calls to compound_head(), we add a call to folio_nr_pages() to get the
stats correct for the eventual support of multi-page folios.
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 'include/linux/pagemap.h')
-rw-r--r-- | include/linux/pagemap.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 8f4a9ba0bfb0..0dda6459d2d1 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h @@ -796,6 +796,8 @@ static inline void cancel_dirty_page(struct page *page) { folio_cancel_dirty(page_folio(page)); } +bool folio_clear_dirty_for_io(struct folio *folio); +bool clear_page_dirty_for_io(struct page *page); int __set_page_dirty_nobuffers(struct page *page); int __set_page_dirty_no_writeback(struct page *page); |