]> git.karo-electronics.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>
Wed, 3 Oct 2012 06:51:00 +0000 (16:51 +1000)
commit372116b0791554e0109c47b2f5c340e7b8a6f633
tree8d2deb5c52927ecc708b0bcbc278a16a4ae10814
parenta4825f11ff142de9baa087851b862a90365801e6
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