jffs2: Fix NFS race by using insert_inode_locked()
authorDavid Woodhouse <David.Woodhouse@intel.com>
Thu, 3 Jun 2010 07:09:12 +0000 (08:09 +0100)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Thu, 3 Jun 2010 07:22:04 +0000 (08:22 +0100)
commite72e6497e74811e01d72b4c1b7537b3aea3ee857
treed78dec67d0aaeea807e5ab32141802620ec7ae41
parentf324e4cb2cadd9a42932c8a158e761ae31b88e72
jffs2: Fix NFS race by using insert_inode_locked()

New inodes need to be locked as we're creating them, so they don't get used
by other things (like NFSd) before they're ready.

Pointed out by Al Viro.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
fs/jffs2/dir.c
fs/jffs2/fs.c