diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-06-10 17:13:09 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-07-14 08:34:32 -0400 |
commit | 00cd8dd3bf95f2cc8435b4cac01d9995635c6d0b (patch) | |
tree | d44be476ced0317ae79f28853734ebe2210ad38e /fs/proc | |
parent | 201f956e43d4542723514e024d948011dd766d43 (diff) |
stop passing nameidata to ->lookup()
Just the flags; only NFS cares even about that, but there are
legitimate uses for such argument. And getting rid of that
completely would require splitting ->lookup() into a couple
of methods (at least), so let's leave that alone for now...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/proc')
-rw-r--r-- | fs/proc/base.c | 18 | ||||
-rw-r--r-- | fs/proc/generic.c | 2 | ||||
-rw-r--r-- | fs/proc/internal.h | 4 | ||||
-rw-r--r-- | fs/proc/namespaces.c | 2 | ||||
-rw-r--r-- | fs/proc/proc_net.c | 2 | ||||
-rw-r--r-- | fs/proc/proc_sysctl.c | 2 | ||||
-rw-r--r-- | fs/proc/root.c | 7 |
7 files changed, 19 insertions, 18 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c index bf749cca4cc6..8eaa5ea1c613 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
@@ -1956,7 +1956,7 @@ out_no_task: | |||
1956 | } | 1956 | } |
1957 | 1957 | ||
1958 | static struct dentry *proc_lookupfd(struct inode *dir, struct dentry *dentry, | 1958 | static struct dentry *proc_lookupfd(struct inode *dir, struct dentry *dentry, |
1959 | struct nameidata *nd) | 1959 | unsigned int flags) |
1960 | { | 1960 | { |
1961 | return proc_lookupfd_common(dir, dentry, proc_fd_instantiate); | 1961 | return proc_lookupfd_common(dir, dentry, proc_fd_instantiate); |
1962 | } | 1962 | } |
@@ -2145,7 +2145,7 @@ proc_map_files_instantiate(struct inode *dir, struct dentry *dentry, | |||
2145 | } | 2145 | } |
2146 | 2146 | ||
2147 | static struct dentry *proc_map_files_lookup(struct inode *dir, | 2147 | static struct dentry *proc_map_files_lookup(struct inode *dir, |
2148 | struct dentry *dentry, struct nameidata *nd) | 2148 | struct dentry *dentry, unsigned int flags) |
2149 | { | 2149 | { |
2150 | unsigned long vm_start, vm_end; | 2150 | unsigned long vm_start, vm_end; |
2151 | struct vm_area_struct *vma; | 2151 | struct vm_area_struct *vma; |
@@ -2380,7 +2380,7 @@ static struct dentry *proc_fdinfo_instantiate(struct inode *dir, | |||
2380 | 2380 | ||
2381 | static struct dentry *proc_lookupfdinfo(struct inode *dir, | 2381 | static struct dentry *proc_lookupfdinfo(struct inode *dir, |
2382 | struct dentry *dentry, | 2382 | struct dentry *dentry, |
2383 | struct nameidata *nd) | 2383 | unsigned int flags) |
2384 | { | 2384 | { |
2385 | return proc_lookupfd_common(dir, dentry, proc_fdinfo_instantiate); | 2385 | return proc_lookupfd_common(dir, dentry, proc_fdinfo_instantiate); |
2386 | } | 2386 | } |
@@ -2630,7 +2630,7 @@ static const struct file_operations proc_attr_dir_operations = { | |||
2630 | }; | 2630 | }; |
2631 | 2631 | ||
2632 | static struct dentry *proc_attr_dir_lookup(struct inode *dir, | 2632 | static struct dentry *proc_attr_dir_lookup(struct inode *dir, |
2633 | struct dentry *dentry, struct nameidata *nd) | 2633 | struct dentry *dentry, unsigned int flags) |
2634 | { | 2634 | { |
2635 | return proc_pident_lookup(dir, dentry, | 2635 | return proc_pident_lookup(dir, dentry, |
2636 | attr_dir_stuff, ARRAY_SIZE(attr_dir_stuff)); | 2636 | attr_dir_stuff, ARRAY_SIZE(attr_dir_stuff)); |
@@ -3114,7 +3114,8 @@ static const struct file_operations proc_tgid_base_operations = { | |||
3114 | .llseek = default_llseek, | 3114 | .llseek = default_llseek, |
3115 | }; | 3115 | }; |
3116 | 3116 | ||
3117 | static struct dentry *proc_tgid_base_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd){ | 3117 | static struct dentry *proc_tgid_base_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) |
3118 | { | ||
3118 | return proc_pident_lookup(dir, dentry, | 3119 | return proc_pident_lookup(dir, dentry, |
3119 | tgid_base_stuff, ARRAY_SIZE(tgid_base_stuff)); | 3120 | tgid_base_stuff, ARRAY_SIZE(tgid_base_stuff)); |
3120 | } | 3121 | } |
@@ -3243,7 +3244,7 @@ out: | |||
3243 | return error; | 3244 | return error; |
3244 | } | 3245 | } |
3245 | 3246 | ||
3246 | struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *nd) | 3247 | struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, unsigned int flags) |
3247 | { | 3248 | { |
3248 | struct dentry *result; | 3249 | struct dentry *result; |
3249 | struct task_struct *task; | 3250 | struct task_struct *task; |
@@ -3470,7 +3471,8 @@ static int proc_tid_base_readdir(struct file * filp, | |||
3470 | tid_base_stuff,ARRAY_SIZE(tid_base_stuff)); | 3471 | tid_base_stuff,ARRAY_SIZE(tid_base_stuff)); |
3471 | } | 3472 | } |
3472 | 3473 | ||
3473 | static struct dentry *proc_tid_base_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd){ | 3474 | static struct dentry *proc_tid_base_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) |
3475 | { | ||
3474 | return proc_pident_lookup(dir, dentry, | 3476 | return proc_pident_lookup(dir, dentry, |
3475 | tid_base_stuff, ARRAY_SIZE(tid_base_stuff)); | 3477 | tid_base_stuff, ARRAY_SIZE(tid_base_stuff)); |
3476 | } | 3478 | } |
@@ -3514,7 +3516,7 @@ out: | |||
3514 | return error; | 3516 | return error; |
3515 | } | 3517 | } |
3516 | 3518 | ||
3517 | static struct dentry *proc_task_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *nd) | 3519 | static struct dentry *proc_task_lookup(struct inode *dir, struct dentry * dentry, unsigned int flags) |
3518 | { | 3520 | { |
3519 | struct dentry *result = ERR_PTR(-ENOENT); | 3521 | struct dentry *result = ERR_PTR(-ENOENT); |
3520 | struct task_struct *task; | 3522 | struct task_struct *task; |
diff --git a/fs/proc/generic.c b/fs/proc/generic.c index 2edf34f2eb61..b3647fe6a608 100644 --- a/fs/proc/generic.c +++ b/fs/proc/generic.c | |||
@@ -446,7 +446,7 @@ out_unlock: | |||
446 | } | 446 | } |
447 | 447 | ||
448 | struct dentry *proc_lookup(struct inode *dir, struct dentry *dentry, | 448 | struct dentry *proc_lookup(struct inode *dir, struct dentry *dentry, |
449 | struct nameidata *nd) | 449 | unsigned int flags) |
450 | { | 450 | { |
451 | return proc_lookup_de(PDE(dir), dir, dentry); | 451 | return proc_lookup_de(PDE(dir), dir, dentry); |
452 | } | 452 | } |
diff --git a/fs/proc/internal.h b/fs/proc/internal.h index e0c2a48dab73..e1167a1c9126 100644 --- a/fs/proc/internal.h +++ b/fs/proc/internal.h | |||
@@ -106,7 +106,7 @@ void pde_users_dec(struct proc_dir_entry *pde); | |||
106 | 106 | ||
107 | extern spinlock_t proc_subdir_lock; | 107 | extern spinlock_t proc_subdir_lock; |
108 | 108 | ||
109 | struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *); | 109 | struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, unsigned int); |
110 | int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir); | 110 | int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir); |
111 | unsigned long task_vsize(struct mm_struct *); | 111 | unsigned long task_vsize(struct mm_struct *); |
112 | unsigned long task_statm(struct mm_struct *, | 112 | unsigned long task_statm(struct mm_struct *, |
@@ -132,7 +132,7 @@ int proc_remount(struct super_block *sb, int *flags, char *data); | |||
132 | * of the /proc/<pid> subdirectories. | 132 | * of the /proc/<pid> subdirectories. |
133 | */ | 133 | */ |
134 | int proc_readdir(struct file *, void *, filldir_t); | 134 | int proc_readdir(struct file *, void *, filldir_t); |
135 | struct dentry *proc_lookup(struct inode *, struct dentry *, struct nameidata *); | 135 | struct dentry *proc_lookup(struct inode *, struct dentry *, unsigned int); |
136 | 136 | ||
137 | 137 | ||
138 | 138 | ||
diff --git a/fs/proc/namespaces.c b/fs/proc/namespaces.c index 40ceb40f9853..b178ed733c36 100644 --- a/fs/proc/namespaces.c +++ b/fs/proc/namespaces.c | |||
@@ -140,7 +140,7 @@ const struct file_operations proc_ns_dir_operations = { | |||
140 | }; | 140 | }; |
141 | 141 | ||
142 | static struct dentry *proc_ns_dir_lookup(struct inode *dir, | 142 | static struct dentry *proc_ns_dir_lookup(struct inode *dir, |
143 | struct dentry *dentry, struct nameidata *nd) | 143 | struct dentry *dentry, unsigned int flags) |
144 | { | 144 | { |
145 | struct dentry *error; | 145 | struct dentry *error; |
146 | struct task_struct *task = get_proc_task(dir); | 146 | struct task_struct *task = get_proc_task(dir); |
diff --git a/fs/proc/proc_net.c b/fs/proc/proc_net.c index 06e1cc17caf6..fe72cd073dea 100644 --- a/fs/proc/proc_net.c +++ b/fs/proc/proc_net.c | |||
@@ -119,7 +119,7 @@ static struct net *get_proc_task_net(struct inode *dir) | |||
119 | } | 119 | } |
120 | 120 | ||
121 | static struct dentry *proc_tgid_net_lookup(struct inode *dir, | 121 | static struct dentry *proc_tgid_net_lookup(struct inode *dir, |
122 | struct dentry *dentry, struct nameidata *nd) | 122 | struct dentry *dentry, unsigned int flags) |
123 | { | 123 | { |
124 | struct dentry *de; | 124 | struct dentry *de; |
125 | struct net *net; | 125 | struct net *net; |
diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c index fda69fa39099..dfafeb2b05a0 100644 --- a/fs/proc/proc_sysctl.c +++ b/fs/proc/proc_sysctl.c | |||
@@ -433,7 +433,7 @@ static struct ctl_table_header *grab_header(struct inode *inode) | |||
433 | } | 433 | } |
434 | 434 | ||
435 | static struct dentry *proc_sys_lookup(struct inode *dir, struct dentry *dentry, | 435 | static struct dentry *proc_sys_lookup(struct inode *dir, struct dentry *dentry, |
436 | struct nameidata *nd) | 436 | unsigned int flags) |
437 | { | 437 | { |
438 | struct ctl_table_header *head = grab_header(dir); | 438 | struct ctl_table_header *head = grab_header(dir); |
439 | struct ctl_table_header *h = NULL; | 439 | struct ctl_table_header *h = NULL; |
diff --git a/fs/proc/root.c b/fs/proc/root.c index 7c30fce037c0..568b20290c75 100644 --- a/fs/proc/root.c +++ b/fs/proc/root.c | |||
@@ -200,13 +200,12 @@ static int proc_root_getattr(struct vfsmount *mnt, struct dentry *dentry, struct | |||
200 | return 0; | 200 | return 0; |
201 | } | 201 | } |
202 | 202 | ||
203 | static struct dentry *proc_root_lookup(struct inode * dir, struct dentry * dentry, struct nameidata *nd) | 203 | static struct dentry *proc_root_lookup(struct inode * dir, struct dentry * dentry, unsigned int flags) |
204 | { | 204 | { |
205 | if (!proc_lookup(dir, dentry, nd)) { | 205 | if (!proc_lookup(dir, dentry, flags)) |
206 | return NULL; | 206 | return NULL; |
207 | } | ||
208 | 207 | ||
209 | return proc_pid_lookup(dir, dentry, nd); | 208 | return proc_pid_lookup(dir, dentry, flags); |
210 | } | 209 | } |
211 | 210 | ||
212 | static int proc_root_readdir(struct file * filp, | 211 | static int proc_root_readdir(struct file * filp, |