aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/generic.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/proc/generic.c')
-rw-r--r--fs/proc/generic.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/fs/proc/generic.c b/fs/proc/generic.c
index 793a67574668..5d709fa8f3a2 100644
--- a/fs/proc/generic.c
+++ b/fs/proc/generic.c
@@ -28,7 +28,7 @@
28 28
29static DEFINE_RWLOCK(proc_subdir_lock); 29static DEFINE_RWLOCK(proc_subdir_lock);
30 30
31static int proc_match(unsigned int len, const char *name, struct proc_dir_entry *de) 31static int proc_match(const char *name, struct proc_dir_entry *de, unsigned int len)
32{ 32{
33 if (len < de->namelen) 33 if (len < de->namelen)
34 return -1; 34 return -1;
@@ -60,7 +60,7 @@ static struct proc_dir_entry *pde_subdir_find(struct proc_dir_entry *dir,
60 struct proc_dir_entry *de = rb_entry(node, 60 struct proc_dir_entry *de = rb_entry(node,
61 struct proc_dir_entry, 61 struct proc_dir_entry,
62 subdir_node); 62 subdir_node);
63 int result = proc_match(len, name, de); 63 int result = proc_match(name, de, len);
64 64
65 if (result < 0) 65 if (result < 0)
66 node = node->rb_left; 66 node = node->rb_left;
@@ -84,7 +84,7 @@ static bool pde_subdir_insert(struct proc_dir_entry *dir,
84 struct proc_dir_entry *this = rb_entry(*new, 84 struct proc_dir_entry *this = rb_entry(*new,
85 struct proc_dir_entry, 85 struct proc_dir_entry,
86 subdir_node); 86 subdir_node);
87 int result = proc_match(de->namelen, de->name, this); 87 int result = proc_match(de->name, this, de->namelen);
88 88
89 parent = *new; 89 parent = *new;
90 if (result < 0) 90 if (result < 0)
@@ -211,8 +211,8 @@ void proc_free_inum(unsigned int inum)
211 * Don't create negative dentries here, return -ENOENT by hand 211 * Don't create negative dentries here, return -ENOENT by hand
212 * instead. 212 * instead.
213 */ 213 */
214struct dentry *proc_lookup_de(struct proc_dir_entry *de, struct inode *dir, 214struct dentry *proc_lookup_de(struct inode *dir, struct dentry *dentry,
215 struct dentry *dentry) 215 struct proc_dir_entry *de)
216{ 216{
217 struct inode *inode; 217 struct inode *inode;
218 218
@@ -235,7 +235,7 @@ struct dentry *proc_lookup_de(struct proc_dir_entry *de, struct inode *dir,
235struct dentry *proc_lookup(struct inode *dir, struct dentry *dentry, 235struct dentry *proc_lookup(struct inode *dir, struct dentry *dentry,
236 unsigned int flags) 236 unsigned int flags)
237{ 237{
238 return proc_lookup_de(PDE(dir), dir, dentry); 238 return proc_lookup_de(dir, dentry, PDE(dir));
239} 239}
240 240
241/* 241/*
@@ -247,8 +247,8 @@ struct dentry *proc_lookup(struct inode *dir, struct dentry *dentry,
247 * value of the readdir() call, as long as it's non-negative 247 * value of the readdir() call, as long as it's non-negative
248 * for success.. 248 * for success..
249 */ 249 */
250int proc_readdir_de(struct proc_dir_entry *de, struct file *file, 250int proc_readdir_de(struct file *file, struct dir_context *ctx,
251 struct dir_context *ctx) 251 struct proc_dir_entry *de)
252{ 252{
253 int i; 253 int i;
254 254
@@ -292,7 +292,7 @@ int proc_readdir(struct file *file, struct dir_context *ctx)
292{ 292{
293 struct inode *inode = file_inode(file); 293 struct inode *inode = file_inode(file);
294 294
295 return proc_readdir_de(PDE(inode), file, ctx); 295 return proc_readdir_de(file, ctx, PDE(inode));
296} 296}
297 297
298/* 298/*