aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/proc/inode.c')
-rw-r--r--fs/proc/inode.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/proc/inode.c b/fs/proc/inode.c
index 6bcb926b101..176ce4cda68 100644
--- a/fs/proc/inode.c
+++ b/fs/proc/inode.c
@@ -416,12 +416,11 @@ static const struct file_operations proc_reg_file_ops_no_compat = {
416}; 416};
417#endif 417#endif
418 418
419struct inode *proc_get_inode(struct super_block *sb, unsigned int ino, 419struct inode *proc_get_inode(struct super_block *sb, struct proc_dir_entry *de)
420 struct proc_dir_entry *de)
421{ 420{
422 struct inode * inode; 421 struct inode * inode;
423 422
424 inode = iget_locked(sb, ino); 423 inode = iget_locked(sb, de->low_ino);
425 if (!inode) 424 if (!inode)
426 return NULL; 425 return NULL;
427 if (inode->i_state & I_NEW) { 426 if (inode->i_state & I_NEW) {
@@ -471,7 +470,7 @@ int proc_fill_super(struct super_block *s)
471 s->s_time_gran = 1; 470 s->s_time_gran = 1;
472 471
473 pde_get(&proc_root); 472 pde_get(&proc_root);
474 root_inode = proc_get_inode(s, PROC_ROOT_INO, &proc_root); 473 root_inode = proc_get_inode(s, &proc_root);
475 if (!root_inode) 474 if (!root_inode)
476 goto out_no_root; 475 goto out_no_root;
477 root_inode->i_uid = 0; 476 root_inode->i_uid = 0;