]> 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>
Thu, 13 Sep 2012 01:01:29 +0000 (11:01 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 13 Sep 2012 07:28:18 +0000 (17:28 +1000)
commitb9268788668cfd9ac99608a02d579d0c80ac0456
tree62fcb59dacbaa7b3cd726a4912814a4eccc8f554
parent17ae7fe70b359fc2e26d232f5228ee0baa3777c2
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