nfsd/create race fixes, infrastructure
commit261bca86ed4f7f391d1938167624e78da61dcc6b
authorAl Viro <viro@zeniv.linux.org.uk>
Tue, 30 Dec 2008 06:48:21 +0000 (30 01:48 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 31 Dec 2008 23:07:43 +0000 (31 18:07 -0500)
tree4601cf090fbfec31fbd554a27c67c717a7caba4b
parent272eb01485dda98e3b8910c7c1a53d597616b0a0
nfsd/create race fixes, infrastructure

new helpers - insert_inode_locked() and insert_inode_locked4().
Hash new inode, making sure that there's no such inode in icache
already.  If there is and it does not end up unhashed (as would
happen if we have nfsd trying to resolve a bogus fhandle), fail.
Otherwise insert our inode into hash and succeed.

In either case have i_state set to new+locked; cleanup ends up
being simpler with such calling conventions.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/inode.c
include/linux/fs.h