diff options
Diffstat (limited to 'fs/proc/internal.h')
-rw-r--r-- | fs/proc/internal.h | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/fs/proc/internal.h b/fs/proc/internal.h index 4a67188c8d74..d697c8ab0a14 100644 --- a/fs/proc/internal.h +++ b/fs/proc/internal.h | |||
@@ -31,24 +31,28 @@ struct mempolicy; | |||
31 | * subdir_node is used to build the rb tree "subdir" of the parent. | 31 | * subdir_node is used to build the rb tree "subdir" of the parent. |
32 | */ | 32 | */ |
33 | struct proc_dir_entry { | 33 | struct proc_dir_entry { |
34 | /* | ||
35 | * number of callers into module in progress; | ||
36 | * negative -> it's going away RSN | ||
37 | */ | ||
38 | atomic_t in_use; | ||
39 | atomic_t count; /* use count */ | ||
40 | struct list_head pde_openers; /* who did ->open, but not ->release */ | ||
41 | /* protects ->pde_openers and all struct pde_opener instances */ | ||
42 | spinlock_t pde_unload_lock; | ||
43 | struct completion *pde_unload_completion; | ||
44 | const struct inode_operations *proc_iops; | ||
45 | const struct file_operations *proc_fops; | ||
46 | void *data; | ||
34 | unsigned int low_ino; | 47 | unsigned int low_ino; |
35 | umode_t mode; | ||
36 | nlink_t nlink; | 48 | nlink_t nlink; |
37 | kuid_t uid; | 49 | kuid_t uid; |
38 | kgid_t gid; | 50 | kgid_t gid; |
39 | loff_t size; | 51 | loff_t size; |
40 | const struct inode_operations *proc_iops; | ||
41 | const struct file_operations *proc_fops; | ||
42 | struct proc_dir_entry *parent; | 52 | struct proc_dir_entry *parent; |
43 | struct rb_root_cached subdir; | 53 | struct rb_root_cached subdir; |
44 | struct rb_node subdir_node; | 54 | struct rb_node subdir_node; |
45 | void *data; | 55 | umode_t mode; |
46 | atomic_t count; /* use count */ | ||
47 | atomic_t in_use; /* number of callers into module in progress; */ | ||
48 | /* negative -> it's going away RSN */ | ||
49 | struct completion *pde_unload_completion; | ||
50 | struct list_head pde_openers; /* who did ->open, but not ->release */ | ||
51 | spinlock_t pde_unload_lock; /* proc_fops checks and pde_users bumps */ | ||
52 | u8 namelen; | 56 | u8 namelen; |
53 | char name[]; | 57 | char name[]; |
54 | } __randomize_layout; | 58 | } __randomize_layout; |
@@ -149,10 +153,9 @@ extern bool proc_fill_cache(struct file *, struct dir_context *, const char *, i | |||
149 | * generic.c | 153 | * generic.c |
150 | */ | 154 | */ |
151 | extern struct dentry *proc_lookup(struct inode *, struct dentry *, unsigned int); | 155 | extern struct dentry *proc_lookup(struct inode *, struct dentry *, unsigned int); |
152 | extern struct dentry *proc_lookup_de(struct proc_dir_entry *, struct inode *, | 156 | struct dentry *proc_lookup_de(struct inode *, struct dentry *, struct proc_dir_entry *); |
153 | struct dentry *); | ||
154 | extern int proc_readdir(struct file *, struct dir_context *); | 157 | extern int proc_readdir(struct file *, struct dir_context *); |
155 | extern int proc_readdir_de(struct proc_dir_entry *, struct file *, struct dir_context *); | 158 | int proc_readdir_de(struct file *, struct dir_context *, struct proc_dir_entry *); |
156 | 159 | ||
157 | static inline struct proc_dir_entry *pde_get(struct proc_dir_entry *pde) | 160 | static inline struct proc_dir_entry *pde_get(struct proc_dir_entry *pde) |
158 | { | 161 | { |