It's preparation to squeeze a new flag PAGE_MAPPING_LZFREE so functions to get a anon_vma from mapping shouldn't assume that +/- PAGE_MAPPING_ANON is enough. Signed-off-by: Minchan Kim <minchan@xxxxxxxxxx> --- mm/rmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/rmap.c b/mm/rmap.c index d9d42316a99a..76069afa6b81 100644 --- a/mm/rmap.c +++ b/mm/rmap.c @@ -412,7 +412,7 @@ struct anon_vma *page_get_anon_vma(struct page *page) if (!page_mapped(page)) goto out; - anon_vma = (struct anon_vma *) (anon_mapping - PAGE_MAPPING_ANON); + anon_vma = page_rmapping(page); if (!atomic_inc_not_zero(&anon_vma->refcount)) { anon_vma = NULL; goto out; @@ -455,7 +455,7 @@ struct anon_vma *page_lock_anon_vma_read(struct page *page) if (!page_mapped(page)) goto out; - anon_vma = (struct anon_vma *) (anon_mapping - PAGE_MAPPING_ANON); + anon_vma = page_rmapping(page); root_anon_vma = ACCESS_ONCE(anon_vma->root); if (down_read_trylock(&root_anon_vma->rwsem)) { /* -- 1.9.0 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>