]> 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, 7 Sep 2012 00:25:06 +0000 (10:25 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 12 Sep 2012 07:08:48 +0000 (17:08 +1000)
commite4598816477f14c01e5c0edf0e6fa607c4a9f268
tree25a779706e9b8923ccda8492c52b90238bf6d632
parente387665850414cc8b426de43502a9c27f220cf12
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