diff options
author | 2021-05-02 23:22:52 -0400 | |
---|---|---|
committer | 2021-10-18 07:49:40 -0400 | |
commit | cd78ab11a8810dd297f4751d17cc53e3dce36024 (patch) | |
tree | d7a52434d892e64a425ce381ca5f426e82f92c9b /include | |
parent | mm/writeback: Add folio_account_redirty() (diff) | |
download | linux-cd78ab11a8810dd297f4751d17cc53e3dce36024.tar.gz linux-cd78ab11a8810dd297f4751d17cc53e3dce36024.tar.bz2 linux-cd78ab11a8810dd297f4751d17cc53e3dce36024.zip |
mm/writeback: Add folio_redirty_for_writepage()
Reimplement redirty_page_for_writepage() as a wrapper around
folio_redirty_for_writepage(). Account the number of pages in the
folio, add kernel-doc and move the prototype to writeback.h.
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')
-rw-r--r-- | include/linux/mm.h | 4 | ||||
-rw-r--r-- | include/linux/writeback.h | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index dd5c6970ba67..23ab040aa65a 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -36,9 +36,7 @@ struct mempolicy; struct anon_vma; struct anon_vma_chain; -struct file_ra_state; struct user_struct; -struct writeback_control; struct pt_regs; extern int sysctl_page_lock_unfairness; @@ -2003,8 +2001,6 @@ extern int try_to_release_page(struct page * page, gfp_t gfp_mask); extern void do_invalidatepage(struct page *page, unsigned int offset, unsigned int length); -int redirty_page_for_writepage(struct writeback_control *wbc, - struct page *page); bool folio_mark_dirty(struct folio *folio); bool set_page_dirty(struct page *page); int set_page_dirty_lock(struct page *page); diff --git a/include/linux/writeback.h b/include/linux/writeback.h index 852100bea351..3571f383dfb6 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h @@ -399,6 +399,8 @@ static inline void account_page_redirty(struct page *page) { folio_account_redirty(page_folio(page)); } +bool folio_redirty_for_writepage(struct writeback_control *, struct folio *); +bool redirty_page_for_writepage(struct writeback_control *, struct page *); void sb_mark_inode_writeback(struct inode *inode); void sb_clear_inode_writeback(struct inode *inode); |