ncpfs: document dentry_unhash usage
authorSage Weil <sage@newdream.net>
Fri, 27 May 2011 20:42:09 +0000 (13:42 -0700)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 28 May 2011 05:02:53 +0000 (01:02 -0400)
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>
fs/ncpfs/dir.c

index e3e646b06404dbce84b78d6c1d9df302d0e33dc1..81c287d105d5107cd28f3b69428f2c366478a02e 100644 (file)
@@ -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;