]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit65170b60571ec10a7c4d9d4171df86fa9dee677a
tree471f4930a15a15c6e482fc0284fef824e02dcee4
parent0d4cbdfca387e1152514dba32c9ae9ea883b2f63
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