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>
This commit is contained in:
parent
b5e84594ca
commit
203a315166
3 changed files with 29 additions and 24 deletions
|
|
@ -1615,10 +1615,9 @@ void mem_cgroup_wb_stats(struct bdi_writeback *wb, unsigned long *pfilepages,
|
|||
void mem_cgroup_track_foreign_dirty_slowpath(struct folio *folio,
|
||||
struct bdi_writeback *wb);
|
||||
|
||||
static inline void mem_cgroup_track_foreign_dirty(struct page *page,
|
||||
static inline void mem_cgroup_track_foreign_dirty(struct folio *folio,
|
||||
struct bdi_writeback *wb)
|
||||
{
|
||||
struct folio *folio = page_folio(page);
|
||||
if (mem_cgroup_disabled())
|
||||
return;
|
||||
|
||||
|
|
@ -1643,7 +1642,7 @@ static inline void mem_cgroup_wb_stats(struct bdi_writeback *wb,
|
|||
{
|
||||
}
|
||||
|
||||
static inline void mem_cgroup_track_foreign_dirty(struct page *page,
|
||||
static inline void mem_cgroup_track_foreign_dirty(struct folio *folio,
|
||||
struct bdi_writeback *wb)
|
||||
{
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue