aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/rmap.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/rmap.h')
-rw-r--r--include/linux/rmap.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/rmap.h b/include/linux/rmap.h
index cb0ba7032609..1f65af44c6d2 100644
--- a/include/linux/rmap.h
+++ b/include/linux/rmap.h
@@ -39,6 +39,14 @@ struct anon_vma {
39 39
40#ifdef CONFIG_MMU 40#ifdef CONFIG_MMU
41 41
42static inline struct anon_vma *page_anon_vma(struct page *page)
43{
44 if (((unsigned long)page->mapping & PAGE_MAPPING_FLAGS) !=
45 PAGE_MAPPING_ANON)
46 return NULL;
47 return page_rmapping(page);
48}
49
42static inline void anon_vma_lock(struct vm_area_struct *vma) 50static inline void anon_vma_lock(struct vm_area_struct *vma)
43{ 51{
44 struct anon_vma *anon_vma = vma->anon_vma; 52 struct anon_vma *anon_vma = vma->anon_vma;