]> 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)
commited1f36c73a41ae579e7461ab739b1b5882900540
tree471f4930a15a15c6e482fc0284fef824e02dcee4
parent04b230da7b7d5be6cc4f153aef24f4caf3857377
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