aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/internal.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-02-07 01:15:42 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2018-02-07 01:15:42 -0500
commita2e5790d841658485d642196dbb0927303d6c22f (patch)
treeb3d28c9bcb7da6880806146fd22a88a7ee7f733e /fs/proc/internal.h
parentab2d92ad881da11331280aedf612d82e61cb6d41 (diff)
parent60c3e026d73ccabb075fb70ba02f8512ab40cf2c (diff)
Merge branch 'akpm' (patches from Andrew)
Merge misc updates from Andrew Morton: - kasan updates - procfs - lib/bitmap updates - other lib/ updates - checkpatch tweaks - rapidio - ubsan - pipe fixes and cleanups - lots of other misc bits * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (114 commits) Documentation/sysctl/user.txt: fix typo MAINTAINERS: update ARM/QUALCOMM SUPPORT patterns MAINTAINERS: update various PALM patterns MAINTAINERS: update "ARM/OXNAS platform support" patterns MAINTAINERS: update Cortina/Gemini patterns MAINTAINERS: remove ARM/CLKDEV SUPPORT file pattern MAINTAINERS: remove ANDROID ION pattern mm: docs: add blank lines to silence sphinx "Unexpected indentation" errors mm: docs: fix parameter names mismatch mm: docs: fixup punctuation pipe: read buffer limits atomically pipe: simplify round_pipe_size() pipe: reject F_SETPIPE_SZ with size over UINT_MAX pipe: fix off-by-one error when checking buffer limits pipe: actually allow root to exceed the pipe buffer limits pipe, sysctl: remove pipe_proc_fn() pipe, sysctl: drop 'min' parameter from pipe-max-size converter kasan: rework Kconfig settings crash_dump: is_kdump_kernel can be boolean kernel/mutex: mutex_is_locked can be boolean ...
Diffstat (limited to 'fs/proc/internal.h')
-rw-r--r--fs/proc/internal.h29
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 */
33struct proc_dir_entry { 33struct 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 */
151extern struct dentry *proc_lookup(struct inode *, struct dentry *, unsigned int); 155extern struct dentry *proc_lookup(struct inode *, struct dentry *, unsigned int);
152extern struct dentry *proc_lookup_de(struct proc_dir_entry *, struct inode *, 156struct dentry *proc_lookup_de(struct inode *, struct dentry *, struct proc_dir_entry *);
153 struct dentry *);
154extern int proc_readdir(struct file *, struct dir_context *); 157extern int proc_readdir(struct file *, struct dir_context *);
155extern int proc_readdir_de(struct proc_dir_entry *, struct file *, struct dir_context *); 158int proc_readdir_de(struct file *, struct dir_context *, struct proc_dir_entry *);
156 159
157static inline struct proc_dir_entry *pde_get(struct proc_dir_entry *pde) 160static inline struct proc_dir_entry *pde_get(struct proc_dir_entry *pde)
158{ 161{