Commit 3174c21b74b56c6a53fddd41a30fd6f757a32bd0

Authored by Al Viro
1 parent 1c755af4df

Move junk from proc_fs.h to fs/proc/internal.h

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Showing 3 changed files with 26 additions and 24 deletions Side-by-side Diff

... ... @@ -92,4 +92,29 @@
92 92 struct list_head lh;
93 93 };
94 94 void pde_users_dec(struct proc_dir_entry *pde);
  95 +
  96 +extern spinlock_t proc_subdir_lock;
  97 +
  98 +struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *);
  99 +int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir);
  100 +unsigned long task_vsize(struct mm_struct *);
  101 +int task_statm(struct mm_struct *, int *, int *, int *, int *);
  102 +void task_mem(struct seq_file *, struct mm_struct *);
  103 +
  104 +struct proc_dir_entry *de_get(struct proc_dir_entry *de);
  105 +void de_put(struct proc_dir_entry *de);
  106 +
  107 +extern struct vfsmount *proc_mnt;
  108 +int proc_fill_super(struct super_block *);
  109 +struct inode *proc_get_inode(struct super_block *, unsigned int, struct proc_dir_entry *);
  110 +
  111 +/*
  112 + * These are generic /proc routines that use the internal
  113 + * "struct proc_dir_entry" tree to traverse the filesystem.
  114 + *
  115 + * The /proc root directory has extended versions to take care
  116 + * of the /proc/<pid> subdirectories.
  117 + */
  118 +int proc_readdir(struct file *, void *, filldir_t);
  119 +struct dentry *proc_lookup(struct inode *, struct dentry *, struct nameidata *);
fs/proc/proc_devtree.c
... ... @@ -11,6 +11,7 @@
11 11 #include <linux/string.h>
12 12 #include <asm/prom.h>
13 13 #include <asm/uaccess.h>
  14 +#include "internal.h"
14 15  
15 16 #ifndef HAVE_ARCH_DEVTREE_FIXUPS
16 17 static inline void set_node_proc_entry(struct device_node *np,
include/linux/proc_fs.h
... ... @@ -93,21 +93,10 @@
93 93  
94 94 #ifdef CONFIG_PROC_FS
95 95  
96   -extern spinlock_t proc_subdir_lock;
97   -
98 96 extern void proc_root_init(void);
99 97  
100 98 void proc_flush_task(struct task_struct *task);
101   -struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *);
102   -int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir);
103   -unsigned long task_vsize(struct mm_struct *);
104   -int task_statm(struct mm_struct *, int *, int *, int *, int *);
105   -void task_mem(struct seq_file *, struct mm_struct *);
106   -void clear_refs_smap(struct mm_struct *mm);
107 99  
108   -struct proc_dir_entry *de_get(struct proc_dir_entry *de);
109   -void de_put(struct proc_dir_entry *de);
110   -
111 100 extern struct proc_dir_entry *create_proc_entry(const char *name, mode_t mode,
112 101 struct proc_dir_entry *parent);
113 102 struct proc_dir_entry *proc_create_data(const char *name, mode_t mode,
114 103  
... ... @@ -116,20 +105,7 @@
116 105 void *data);
117 106 extern void remove_proc_entry(const char *name, struct proc_dir_entry *parent);
118 107  
119   -extern struct vfsmount *proc_mnt;
120 108 struct pid_namespace;
121   -extern int proc_fill_super(struct super_block *);
122   -extern struct inode *proc_get_inode(struct super_block *, unsigned int, struct proc_dir_entry *);
123   -
124   -/*
125   - * These are generic /proc routines that use the internal
126   - * "struct proc_dir_entry" tree to traverse the filesystem.
127   - *
128   - * The /proc root directory has extended versions to take care
129   - * of the /proc/<pid> subdirectories.
130   - */
131   -extern int proc_readdir(struct file *, void *, filldir_t);
132   -extern struct dentry *proc_lookup(struct inode *, struct dentry *, struct nameidata *);
133 109  
134 110 extern int pid_ns_prepare_proc(struct pid_namespace *ns);
135 111 extern void pid_ns_release_proc(struct pid_namespace *ns);