]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm/writeback: Add folio_mark_dirty()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Tue, 27 Apr 2021 03:53:10 +0000 (23:53 -0400)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Sun, 15 Aug 2021 03:09:20 +0000 (23:09 -0400)
commit269b0bf991ba4c2741b2f539e14578b1464103db
treebf222031d62a54575de4ad5e64754bce21e2f872
parente93ccd808dff4141a2880c93fecb5742304359e0
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>
include/linux/mm.h
mm/folio-compat.c
mm/page-writeback.c