diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2021-05-04 18:01:10 +0300 |
---|---|---|
committer | Matthew Wilcox (Oracle) <willy@infradead.org> | 2021-10-18 14:49:39 +0300 |
commit | 203a31516616111b8eaaf00c16fa3fcaa25e6f81 (patch) | |
tree | aa6994870d8cfe39715f7a34a21ed697cd2450f4 /include/linux/pagemap.h | |
parent | b5e84594cafb934e023ee7d4ea4208b6c6b65fcc (diff) | |
download | linux-203a31516616111b8eaaf00c16fa3fcaa25e6f81.tar.xz |
mm/writeback: Add __folio_mark_dirty()
Turn __set_page_dirty() into a wrapper around __folio_mark_dirty().
Convert account_page_dirtied() into folio_account_dirtied() and account
the number of pages in the folio to support multi-page folios.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
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 | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index bdbd7be67812..aa9a083083df 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h @@ -772,8 +772,13 @@ void end_page_writeback(struct page *page); void folio_end_writeback(struct folio *folio); void wait_for_stable_page(struct page *page); void folio_wait_stable(struct folio *folio); +void __folio_mark_dirty(struct folio *folio, struct address_space *, int warn); +static inline void __set_page_dirty(struct page *page, + struct address_space *mapping, int warn) +{ + __folio_mark_dirty(page_folio(page), mapping, warn); +} -void __set_page_dirty(struct page *, struct address_space *, int warn); int __set_page_dirty_nobuffers(struct page *page); int __set_page_dirty_no_writeback(struct page *page); |