From f77c80142e1afe6d5c16975ca5d7d1fc324b16f9 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sat, 1 Nov 2014 03:13:17 -0400 Subject: bury struct proc_ns in fs/proc a) make get_proc_ns() return a pointer to struct ns_common b) mirror ns_ops in dentry->d_fsdata of ns dentries, so that is_mnt_ns_file() could get away with fewer dereferences. That way struct proc_ns becomes invisible outside of fs/proc/*.c Signed-off-by: Al Viro --- include/linux/proc_ns.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'include/linux/proc_ns.h') diff --git a/include/linux/proc_ns.h b/include/linux/proc_ns.h index f5780ee7f8f7..2837ff41cfe3 100644 --- a/include/linux/proc_ns.h +++ b/include/linux/proc_ns.h @@ -16,11 +16,6 @@ struct proc_ns_operations { int (*install)(struct nsproxy *nsproxy, struct ns_common *ns); }; -struct proc_ns { - struct ns_common *ns; - const struct proc_ns_operations *ns_ops; -}; - extern const struct proc_ns_operations netns_operations; extern const struct proc_ns_operations utsns_operations; extern const struct proc_ns_operations ipcns_operations; @@ -44,7 +39,7 @@ enum { extern int pid_ns_prepare_proc(struct pid_namespace *ns); extern void pid_ns_release_proc(struct pid_namespace *ns); extern struct file *proc_ns_fget(int fd); -extern struct proc_ns *get_proc_ns(struct inode *); +extern struct ns_common *get_proc_ns(struct inode *); extern int proc_alloc_inum(unsigned int *pino); extern void proc_free_inum(unsigned int inum); extern bool proc_ns_inode(struct inode *inode); @@ -59,7 +54,7 @@ static inline struct file *proc_ns_fget(int fd) return ERR_PTR(-EINVAL); } -static inline struct proc_ns *get_proc_ns(struct inode *inode) { return NULL; } +static inline struct ns_common *get_proc_ns(struct inode *inode) { return NULL; } static inline int proc_alloc_inum(unsigned int *inum) { -- cgit