linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH] ocfs2: don't depend on DCACHE_DISCONNECTED
@ 2012-07-31 22:33 J. Bruce Fields
  2012-08-02  7:57 ` Joel Becker
  0 siblings, 1 reply; 6+ messages in thread
From: J. Bruce Fields @ 2012-07-31 22:33 UTC (permalink / raw)
  To: Mark Fasheh, Joel Becker; +Cc: ocfs2-devel, linux-fsdevel

From: "J. Bruce Fields" <bfields@redhat.com>

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 <bfields@redhat.com>
---
 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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-08-16 19:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-31 22:33 [RFC PATCH] ocfs2: don't depend on DCACHE_DISCONNECTED J. Bruce Fields
2012-08-02  7:57 ` Joel Becker
2012-08-02 12:59   ` J. Bruce Fields
2012-08-15 10:22     ` [Ocfs2-devel] " Joel Becker
2012-08-16 19:42       ` J. Bruce Fields
2012-08-16 19:54         ` [PATCH] ocfs2: comment missing-cluster-lock warning J. Bruce Fields

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).