From: Sage Weil Date: Fri, 27 May 2011 20:42:09 +0000 (-0700) Subject: ncpfs: document dentry_unhash usage X-Git-Tag: v3.0-rc1~21^2~13 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=7ce605d93b775e8a960b0be244f7be565e73b3c1;p=linux.git 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 CC: linux-kernel@vger.kernel.org Signed-off-by: Sage Weil Signed-off-by: Al Viro --- diff --git a/fs/ncpfs/dir.c b/fs/ncpfs/dir.c index e3e646b06404..81c287d105d5 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;