aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryan <clouds.yan@gmail.com>2012-10-04 20:15:41 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-05 14:05:18 -0400
commit0e06936057674ef3f2bd0b398a32ddc512642992 (patch)
tree40b41684f6fe18ef45486e1d522bbca9e791bcda
parent620727506dc6da0562fa4f6950dedb8a51bd8237 (diff)
proc: no need to initialize proc_inode->fd in proc_get_inode()
proc_get_inode() obtains the inode via a call to iget_locked(). iget_locked() calls alloc_inode() which will call proc_alloc_inode() which clears proc_inode.fd, so there is no need to clear this field in proc_get_inode(). If iget_locked() instead found the inode via find_inode_fast(), that inode will not have I_NEW set so this change has no effect. Signed-off-by: yan <clouds.yan@gmail.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--fs/proc/inode.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/proc/inode.c b/fs/proc/inode.c
index 7ac817b64a71..3b22bbdee9ec 100644
--- a/fs/proc/inode.c
+++ b/fs/proc/inode.c
@@ -450,7 +450,6 @@ struct inode *proc_get_inode(struct super_block *sb, struct proc_dir_entry *de)
450 return NULL; 450 return NULL;
451 if (inode->i_state & I_NEW) { 451 if (inode->i_state & I_NEW) {
452 inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; 452 inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
453 PROC_I(inode)->fd = 0;
454 PROC_I(inode)->pde = de; 453 PROC_I(inode)->pde = de;
455 454
456 if (de->mode) { 455 if (de->mode) {