nfsd: vfs_mkdir() might succeed leaving dentry negative unhashed
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 11 May 2018 21:03:19 +0000 (17:03 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 21 May 2018 18:30:10 +0000 (14:30 -0400)
commit3819bb0d79f50b05910db5bdc6d9ef512184e3b1
tree471f4930a15a15c6e482fc0284fef824e02dcee4
parent9c3e9025a3f7ed25c99a0add8af65431c8043800
nfsd: vfs_mkdir() might succeed leaving dentry negative unhashed

That can (and does, on some filesystems) happen - ->mkdir() (and thus
vfs_mkdir()) can legitimately leave its argument negative and just
unhash it, counting upon the lookup to pick the object we'd created
next time we try to look at that name.

Some vfs_mkdir() callers forget about that possibility...

Acked-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/nfsd/vfs.c