From mboxrd@z Thu Jan 1 00:00:00 1970 From: "J. Bruce Fields" Subject: [RFC PATCH] ocfs2: don't depend on DCACHE_DISCONNECTED Date: Tue, 31 Jul 2012 18:33:23 -0400 Message-ID: <20120731223323.GA32253@fieldses.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: ocfs2-devel@oss.oracle.com, linux-fsdevel@vger.kernel.org To: Mark Fasheh , Joel Becker Return-path: Received: from fieldses.org ([174.143.236.118]:41871 "EHLO fieldses.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754328Ab2GaWd3 (ORCPT ); Tue, 31 Jul 2012 18:33:29 -0400 Content-Disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-ID: From: "J. Bruce Fields" XXX: I don't understand this code, but I also can't see how it can be right as is: a dentry marked DCACHE_DISCONNECTED can in fact be a fully-connected member of the dcache. Is IS_ROOT() the right check instead? Signed-off-by: J. Bruce Fields --- fs/ocfs2/dcache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ocfs2/dcache.c b/fs/ocfs2/dcache.c index e5ba348..2a66620 100644 --- a/fs/ocfs2/dcache.c +++ b/fs/ocfs2/dcache.c @@ -461,7 +461,7 @@ static void ocfs2_dentry_iput(struct dentry *dentry, struct inode *inode) * No dentry lock is ok if we're disconnected or * unhashed. */ - if (!(dentry->d_flags & DCACHE_DISCONNECTED) && + if (!IS_ROOT(dentry)) && !d_unhashed(dentry)) { unsigned long long ino = 0ULL; if (inode) -- 1.7.11.2