提交 16796549 编写于 作者: E Eric W. Biederman 提交者: Linus Torvalds

[PATCH] proc: Remove unnecessary and misleading assignments from proc_pid_make_inode

The removed fields are already set by proc_alloc_inode.  Initializing them in
proc_alloc_inode implies they need it for proper cleanup.  At least ei->pde
was not set on all paths making it look like proc_alloc_inode was buggy.  So
just remove the redundant assignments.
Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 ff9724a3
......@@ -1357,7 +1357,6 @@ static struct inode *proc_pid_make_inode(struct super_block * sb, struct task_st
/* Common stuff */
ei = PROC_I(inode);
ei->task = NULL;
inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
inode->i_ino = fake_ino(task->pid, ino);
......@@ -1382,7 +1381,6 @@ static struct inode *proc_pid_make_inode(struct super_block * sb, struct task_st
return inode;
out_unlock:
ei->pde = NULL;
iput(inode);
return NULL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册