]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
proc: no need to initialize proc_inode->fd in proc_get_inode()
authoryan <clouds.yan@gmail.com>
Fri, 28 Sep 2012 00:22:16 +0000 (10:22 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 4 Oct 2012 05:04:04 +0000 (15:04 +1000)
commitb6478d15c099abc868230f57f6c7564ab8de9184
tree35a85f813ac51fafcb66de8e8e244f7c8f6201d6
parent89ee30ab5a2ba6f55f86e54d979405b532e0b78d
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>
fs/proc/inode.c