diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2022-02-02 07:33:08 +0300 |
---|---|---|
committer | Matthew Wilcox (Oracle) <willy@infradead.org> | 2022-03-21 20:01:35 +0300 |
commit | 9595d76942b8714627d670a7e7ae543812c731ae (patch) | |
tree | febd0a334505f4e11fcd427b96e740ab0548a3cc /mm/folio-compat.c | |
parent | c8423186078312d344474bcb9e2b1ce0a78dbde4 (diff) | |
download | linux-9595d76942b8714627d670a7e7ae543812c731ae.tar.xz |
mm/rmap: Turn page_lock_anon_vma_read() into folio_lock_anon_vma_read()
Add back page_lock_anon_vma_read() as a wrapper. This saves a few calls
to compound_head(). If any callers were passing a tail page before,
this would have failed to lock the anon VMA as page->mapping is not
valid for tail pages.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Diffstat (limited to 'mm/folio-compat.c')
-rw-r--r-- | mm/folio-compat.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mm/folio-compat.c b/mm/folio-compat.c index 46fa179e32fb..968ad97bbffa 100644 --- a/mm/folio-compat.c +++ b/mm/folio-compat.c @@ -164,3 +164,10 @@ void putback_lru_page(struct page *page) { folio_putback_lru(page_folio(page)); } + +#ifdef CONFIG_MMU +struct anon_vma *page_lock_anon_vma_read(struct page *page) +{ + return folio_lock_anon_vma_read(page_folio(page)); +} +#endif |