]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/proc_fs.h
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
[linux-2.6-omap-h63xx.git] / include / linux / proc_fs.h
index 3469f96bc8b2d0e11543d57246f4c4ae75f64115..cd13a78c5db84584c59c130899604c2dfeb40d73 100644 (file)
@@ -7,6 +7,8 @@
 #include <linux/magic.h>
 #include <asm/atomic.h>
 
+struct completion;
+
 /*
  * The proc filesystem constants/structures
  */
@@ -56,6 +58,14 @@ struct proc_dir_entry {
        gid_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;
        get_info_t *get_info;
        struct module *owner;
@@ -65,7 +75,9 @@ struct proc_dir_entry {
        write_proc_t *write_proc;
        atomic_t count;         /* use count */
        int deleted;            /* delete flag */
-       void *set;
+       int pde_users;  /* number of callers into module in progress */
+       spinlock_t pde_unload_lock; /* proc_fops checks and pde_users bumps */
+       struct completion *pde_unload_completion;
 };
 
 struct kcore_list {