From 5381e169e78405bd54256860f151596f5a887617 Mon Sep 17 00:00:00 2001 From: Oleg Nesterov Date: Thu, 9 Oct 2014 15:25:24 -0700 Subject: proc: introduce proc_mem_open() Extract the mm_access() code from __mem_open() into the new helper, proc_mem_open(), the next patch will add another caller. Signed-off-by: Oleg Nesterov Acked-by: Kirill A. Shutemov Acked-by: Cyrill Gorcunov Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/proc/internal.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'fs/proc/internal.h') diff --git a/fs/proc/internal.h b/fs/proc/internal.h index 7da13e49128a..3c685563406f 100644 --- a/fs/proc/internal.h +++ b/fs/proc/internal.h @@ -278,6 +278,8 @@ struct proc_maps_private { #endif }; +struct mm_struct *proc_mem_open(struct inode *inode, unsigned int mode); + extern const struct file_operations proc_pid_maps_operations; extern const struct file_operations proc_tid_maps_operations; extern const struct file_operations proc_pid_numa_maps_operations; -- cgit v1.2.3-59-g8ed1b