aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/proc_fs.h
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-04-03 19:07:30 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-04-09 15:16:51 -0400
commit866ad9a747bbf5461739fcae6d0a41c8971bbe1d (patch)
tree6a94d3434bbb9034f9aeed68a59e799abf7f8ff2 /include/linux/proc_fs.h
parentad147d011f4e9d4e4309f7974fd19c7f875ccb14 (diff)
procfs: preparations for remove_proc_entry() race fixes
* leave ->proc_fops alone; make ->pde_users negative instead * trim pde_opener * move relevant code in fs/proc/inode.c Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/proc_fs.h')
-rw-r--r--include/linux/proc_fs.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
index bcc0e10ef1df..947ae7eb63ef 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -60,20 +60,13 @@ struct proc_dir_entry {
60 kgid_t gid; 60 kgid_t gid;
61 loff_t size; 61 loff_t size;
62 const struct inode_operations *proc_iops; 62 const struct inode_operations *proc_iops;
63 /*
64 * NULL ->proc_fops means "PDE is going away RSN" or
65 * "PDE is just created". In either case, e.g. ->read_proc won't be
66 * called because it's too late or too early, respectively.
67 *
68 * If you're allocating ->proc_fops dynamically, save a pointer
69 * somewhere.
70 */
71 const struct file_operations *proc_fops; 63 const struct file_operations *proc_fops;
72 struct proc_dir_entry *next, *parent, *subdir; 64 struct proc_dir_entry *next, *parent, *subdir;
73 void *data; 65 void *data;
74 read_proc_t *read_proc; 66 read_proc_t *read_proc;
75 atomic_t count; /* use count */ 67 atomic_t count; /* use count */
76 int pde_users; /* number of callers into module in progress */ 68 int pde_users; /* number of callers into module in progress; */
69 /* negative -> it's going away RSN */
77 struct completion *pde_unload_completion; 70 struct completion *pde_unload_completion;
78 struct list_head pde_openers; /* who did ->open, but not ->release */ 71 struct list_head pde_openers; /* who did ->open, but not ->release */
79 spinlock_t pde_unload_lock; /* proc_fops checks and pde_users bumps */ 72 spinlock_t pde_unload_lock; /* proc_fops checks and pde_users bumps */