diff options
author | Bharat Nihalani <bnihalani@nvidia.com> | 2013-12-30 20:30:28 +0530 |
---|---|---|
committer | Bharat Nihalani <bnihalani@nvidia.com> | 2013-12-30 20:30:28 +0530 |
commit | 546f63c2a5ecbf08064d9a65b799906832dbe2e6 (patch) | |
tree | b4e9b8eb333935f83109fac0426ec3dfac21c85a /include/linux/mm_types.h | |
parent | b9695b63896bea96cf2ad192673429eac7f9f467 (diff) | |
parent | c5149b1e38ecd5c3f3d3add7fc118fb47b719929 (diff) |
Merge branch 'remotes/android/android-3.10' into dev-kernel-3.10
Change-Id: I0c919e55654e0c224a5f8a5df80d9f49e92dbb37
Diffstat (limited to 'include/linux/mm_types.h')
-rw-r--r-- | include/linux/mm_types.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 4a189ba6b128..93ddd4eb910b 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -255,6 +255,10 @@ struct vm_area_struct { * For areas with an address space and backing store, * linkage into the address_space->i_mmap interval tree, or * linkage of vma in the address_space->i_mmap_nonlinear list. + * + * For private anonymous mappings, a pointer to a null terminated string + * in the user process containing the name given to the vma, or NULL + * if unnamed. */ union { struct { @@ -262,6 +266,7 @@ struct vm_area_struct { unsigned long rb_subtree_last; } linear; struct list_head nonlinear; + const char __user *anon_name; } shared; /* @@ -457,4 +462,14 @@ static inline cpumask_t *mm_cpumask(struct mm_struct *mm) return mm->cpu_vm_mask_var; } + +/* Return the name for an anonymous mapping or NULL for a file-backed mapping */ +static inline const char __user *vma_get_anon_name(struct vm_area_struct *vma) +{ + if (vma->vm_file) + return NULL; + + return vma->shared.anon_name; +} + #endif /* _LINUX_MM_TYPES_H */ |