mm/writeback: Add __folio_end_writeback()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Sat, 16 Jan 2021 04:34:16 +0000 (23:34 -0500)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Mon, 18 Oct 2021 11:49:39 +0000 (07:49 -0400)
commit269ccca3899f6bce49e004f50f623e0b161fb027
tree08a5a5ab6250433013e0c32632766a9468b36bef
parentcc24df4cd15f197676e8ba43383ba80e78a5b865
mm/writeback: Add __folio_end_writeback()

test_clear_page_writeback() is actually an mm-internal function, although
it's named as if it's a pagecache function.  Move it to mm/internal.h,
rename it to __folio_end_writeback() and change the return type to bool.

The conversion from page to folio is mostly about accounting the number
of pages being written back, although it does eliminate a couple of
calls to compound_head().

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/page-flags.h
mm/filemap.c
mm/internal.h
mm/page-writeback.c