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>
Mon, 18 Oct 2021 11:49:39 +0000 (07:49 -0400)
commitb5e84594cafb934e023ee7d4ea4208b6c6b65fcc
treead0e351763d2e8086850d2fc257eb529b22febd4
parentf143f1ea5a5380b2682e6836fcd24338a2aa82c7
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