From: yan Date: Fri, 28 Sep 2012 00:22:16 +0000 (+1000) Subject: proc: no need to initialize proc_inode->fd in proc_get_inode() X-Git-Tag: next-20121005~1^2~34 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8de1fbf90d5e07bb7462b1dc9efa76e680e6f9d9;p=karo-tx-linux.git 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 Cc: Al Viro Signed-off-by: Andrew Morton --- 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) return NULL; if (inode->i_state & I_NEW) { inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; - PROC_I(inode)->fd = 0; PROC_I(inode)->pde = de; if (de->mode) {