summaryrefslogtreecommitdiff
path: root/fs/ncpfs
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2011-05-27 13:42:09 -0700
committerAl Viro <viro@zeniv.linux.org.uk>2011-05-28 01:02:53 -0400
commit7ce605d93b775e8a960b0be244f7be565e73b3c1 (patch)
treeeb37f0f8f83940e7328fc9b7762de3bd04eb358c /fs/ncpfs
parent55e5b7e022eaaa805a44e3b6ecd5c8638d862050 (diff)
downloadlinux-3.10-7ce605d93b775e8a960b0be244f7be565e73b3c1.tar.gz
linux-3.10-7ce605d93b775e8a960b0be244f7be565e73b3c1.tar.bz2
linux-3.10-7ce605d93b775e8a960b0be244f7be565e73b3c1.zip
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: Sage Weil <sage@newdream.net> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ncpfs')
-rw-r--r--fs/ncpfs/dir.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/ncpfs/dir.c b/fs/ncpfs/dir.c
index e3e646b0640..81c287d105d 100644
--- a/fs/ncpfs/dir.c
+++ b/fs/ncpfs/dir.c
@@ -1033,8 +1033,11 @@ static int ncp_rmdir(struct inode *dir, struct dentry *dentry)
DPRINTK("ncp_rmdir: removing %s/%s\n",
dentry->d_parent->d_name.name, dentry->d_name.name);
+ /*
+ * fail with EBUSY if there are still references to this
+ * directory.
+ */
dentry_unhash(dentry);
-
error = -EBUSY;
if (!d_unhashed(dentry))
goto out;