diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2021-05-03 10:06:55 -0400 |
---|---|---|
committer | Matthew Wilcox (Oracle) <willy@infradead.org> | 2021-10-18 07:49:40 -0400 |
commit | 25ff8b15537dfa0e1a62d55cfcc48f3c8bd8a76c (patch) | |
tree | f50a324e290eec40bbe0876b2a901a1b20124856 /include/linux/writeback.h | |
parent | 9350f20a070d27a6c6a292a2b6f6091e7ea90a65 (diff) |
mm/writeback: Add folio_account_redirty()
Account the number of pages in the folio that we're redirtying.
Turn account_page_dirty() into a wrapper around it. Also turn
the comment on folio_account_redirty() into kernel-doc and
edit it slightly so it makes sense to its potential callers.
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/writeback.h')
-rw-r--r-- | include/linux/writeback.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index d4f24eba066f..852100bea351 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h @@ -394,7 +394,11 @@ void tag_pages_for_writeback(struct address_space *mapping, pgoff_t start, pgoff_t end); bool filemap_dirty_folio(struct address_space *mapping, struct folio *folio); -void account_page_redirty(struct page *page); +void folio_account_redirty(struct folio *folio); +static inline void account_page_redirty(struct page *page) +{ + folio_account_redirty(page_folio(page)); +} void sb_mark_inode_writeback(struct inode *inode); void sb_clear_inode_writeback(struct inode *inode); |