Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754576Ab1E0UmN (ORCPT ); Fri, 27 May 2011 16:42:13 -0400 Received: from cobra.newdream.net ([66.33.216.30]:43527 "EHLO cobra.newdream.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754285Ab1E0Ulw (ORCPT ); Fri, 27 May 2011 16:41:52 -0400 From: Sage Weil To: hch@infradead.org, viro@ZenIV.linux.org.uk Cc: linux-fsdevel@vger.kernel.org, Sage Weil , Petr Vandrovec , linux-kernel@vger.kernel.org Subject: [PATCH 16/26] ncpfs: document dentry_unhash usage Date: Fri, 27 May 2011 13:42:09 -0700 Message-Id: <1306528939-30636-17-git-send-email-sage@newdream.net> X-Mailer: git-send-email 1.7.0 In-Reply-To: <1306528939-30636-1-git-send-email-sage@newdream.net> References: <1306528939-30636-1-git-send-email-sage@newdream.net> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1076 Lines: 35 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 --- fs/ncpfs/dir.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/fs/ncpfs/dir.c b/fs/ncpfs/dir.c index e3e646b..81c287d 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; -- 1.7.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/