Message ID | 20200908195539.25896-11-willy@infradead.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Remove assumptions of THP size | expand |
On Tue, Sep 08, 2020 at 08:55:37PM +0100, Matthew Wilcox (Oracle) wrote: > page->mapping is undefined for tail pages, so operate exclusively on > the head page. > > Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
On Tue, 8 Sep 2020 20:55:37 +0100 "Matthew Wilcox (Oracle)" <willy@infradead.org> wrote: > page->mapping is undefined for tail pages, so operate exclusively on > the head page. > > Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: SeongJae Park <sjpark@amazon.de> Thanks, SeongJae Park
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 4e4ddd67b71e..dac075e451d3 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -2849,6 +2849,7 @@ EXPORT_SYMBOL_GPL(wait_on_page_writeback); */ void wait_for_stable_page(struct page *page) { + page = thp_head(page); if (bdi_cap_stable_pages_required(inode_to_bdi(page->mapping->host))) wait_on_page_writeback(page); }
page->mapping is undefined for tail pages, so operate exclusively on the head page. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> --- mm/page-writeback.c | 1 + 1 file changed, 1 insertion(+)