mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
mm/writeback: Add folio_mark_dirty()
Reimplement set_page_dirty() as a wrapper around folio_mark_dirty(). There is no change to filesystems as they were already being called with the compound_head of the page being marked dirty. We avoid several calls to compound_head(), both statically (through using folio_test_dirty() instead of PageDirty() and dynamically by calling folio_mapping() instead of page_mapping(). Also return bool instead of int to show the range of values actually returned, and add kernel-doc. 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>
This commit is contained in:
parent
f143f1ea5a
commit
b5e84594ca
3 changed files with 27 additions and 17 deletions
|
@ -2008,7 +2008,8 @@ int redirty_page_for_writepage(struct writeback_control *wbc,
|
|||
struct page *page);
|
||||
void account_page_cleaned(struct page *page, struct address_space *mapping,
|
||||
struct bdi_writeback *wb);
|
||||
int set_page_dirty(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);
|
||||
void __cancel_dirty_page(struct page *page);
|
||||
static inline void cancel_dirty_page(struct page *page)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue