aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/proc/inode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/proc/inode.c b/fs/proc/inode.c
index a86aebc9ba7c..869116c2afbe 100644
--- a/fs/proc/inode.c
+++ b/fs/proc/inode.c
@@ -446,9 +446,10 @@ static const struct file_operations proc_reg_file_ops_no_compat = {
446 446
447struct inode *proc_get_inode(struct super_block *sb, struct proc_dir_entry *de) 447struct inode *proc_get_inode(struct super_block *sb, struct proc_dir_entry *de)
448{ 448{
449 struct inode *inode = iget_locked(sb, de->low_ino); 449 struct inode *inode = new_inode_pseudo(sb);
450 450
451 if (inode && (inode->i_state & I_NEW)) { 451 if (inode) {
452 inode->i_ino = de->low_ino;
452 inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; 453 inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
453 PROC_I(inode)->pde = de; 454 PROC_I(inode)->pde = de;
454 455
@@ -476,7 +477,6 @@ struct inode *proc_get_inode(struct super_block *sb, struct proc_dir_entry *de)
476 inode->i_fop = de->proc_fops; 477 inode->i_fop = de->proc_fops;
477 } 478 }
478 } 479 }
479 unlock_new_inode(inode);
480 } else 480 } else
481 pde_put(de); 481 pde_put(de);
482 return inode; 482 return inode;