summaryrefslogtreecommitdiffstats
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)
downloadblackbird-op-linux-866ad9a747bbf5461739fcae6d0a41c8971bbe1d.tar.gz
blackbird-op-linux-866ad9a747bbf5461739fcae6d0a41c8971bbe1d.zip
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 {
kgid_t gid;
loff_t size;
const struct inode_operations *proc_iops;
- /*
- * NULL ->proc_fops means "PDE is going away RSN" or
- * "PDE is just created". In either case, e.g. ->read_proc won't be
- * called because it's too late or too early, respectively.
- *
- * If you're allocating ->proc_fops dynamically, save a pointer
- * somewhere.
- */
const struct file_operations *proc_fops;
struct proc_dir_entry *next, *parent, *subdir;
void *data;
read_proc_t *read_proc;
atomic_t count; /* use count */
- int pde_users; /* number of callers into module in progress */
+ int pde_users; /* number of callers into module in progress; */
+ /* negative -> it's going away RSN */
struct completion *pde_unload_completion;
struct list_head pde_openers; /* who did ->open, but not ->release */
spinlock_t pde_unload_lock; /* proc_fops checks and pde_users bumps */
OpenPOWER on IntegriCloud