filemap: Use a folio in filemap_page_mkwrite
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Sat, 13 Mar 2021 04:57:44 +0000 (23:57 -0500)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Tue, 4 Jan 2022 18:15:34 +0000 (13:15 -0500)
commit960ea971fa6cdac8d4825a6aaf99b92882e79fbb
tree9afc2b3ce4e4be564890374793d2b4489d217979
parent820b05e92bdf07de94bc52c17d935d9ca0a481b3
filemap: Use a folio in filemap_page_mkwrite

This fixes a bug for tail pages.  They always have a NULL mapping, so
the check would fail and we would never mark the folio as dirty.
Ends up growing the kernel by 19 bytes although there will be fewer
calls to compound_head() dynamically.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: William Kucharski <william.kucharski@oracle.com>
mm/filemap.c