Commit 7ce605d9 authored by Sage Weil's avatar Sage Weil Committed by Al Viro

ncpfs: document dentry_unhash usage

ncpfs returns EBUSY if there are any references to the directory.  The
dentry_unhash call only unhashes the dentry if there are no references.

CC: Petr Vandrovec <petr@vandrovec.name>
CC: linux-kernel@vger.kernel.org
Signed-off-by: default avatarSage Weil <sage@newdream.net>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 55e5b7e0
...@@ -1033,8 +1033,11 @@ static int ncp_rmdir(struct inode *dir, struct dentry *dentry) ...@@ -1033,8 +1033,11 @@ static int ncp_rmdir(struct inode *dir, struct dentry *dentry)
DPRINTK("ncp_rmdir: removing %s/%s\n", DPRINTK("ncp_rmdir: removing %s/%s\n",
dentry->d_parent->d_name.name, dentry->d_name.name); dentry->d_parent->d_name.name, dentry->d_name.name);
/*
* fail with EBUSY if there are still references to this
* directory.
*/
dentry_unhash(dentry); dentry_unhash(dentry);
error = -EBUSY; error = -EBUSY;
if (!d_unhashed(dentry)) if (!d_unhashed(dentry))
goto out; goto out;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment