All of lore.kernel.org
 help / color / mirror / Atom feed
From: J. Bruce Fields <bfields@fieldses.org>
To: Mark Fasheh <mfasheh@suse.com>, Joel Becker <jlbec@evilplan.org>
Cc: ocfs2-devel@oss.oracle.com, linux-fsdevel@vger.kernel.org
Subject: [Ocfs2-devel] [RFC PATCH] ocfs2: don't depend on DCACHE_DISCONNECTED
Date: Tue, 31 Jul 2012 18:33:23 -0400	[thread overview]
Message-ID: <20120731223323.GA32253@fieldses.org> (raw)

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

WARNING: multiple messages have this Message-ID (diff)
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Mark Fasheh <mfasheh@suse.com>, Joel Becker <jlbec@evilplan.org>
Cc: ocfs2-devel@oss.oracle.com, linux-fsdevel@vger.kernel.org
Subject: [RFC PATCH] ocfs2: don't depend on DCACHE_DISCONNECTED
Date: Tue, 31 Jul 2012 18:33:23 -0400	[thread overview]
Message-ID: <20120731223323.GA32253@fieldses.org> (raw)

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


             reply	other threads:[~2012-07-31 22:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-31 22:33 J. Bruce Fields [this message]
2012-07-31 22:33 ` [RFC PATCH] ocfs2: don't depend on DCACHE_DISCONNECTED J. Bruce Fields
2012-08-02  7:57 ` [Ocfs2-devel] " Joel Becker
2012-08-02  7:57   ` Joel Becker
2012-08-02 12:59   ` [Ocfs2-devel] " J. Bruce Fields
2012-08-02 12:59     ` J. Bruce Fields
2012-08-15 10:22     ` [Ocfs2-devel] " Joel Becker
2012-08-15 10:22       ` 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120731223323.GA32253@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=jlbec@evilplan.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=mfasheh@suse.com \
    --cc=ocfs2-devel@oss.oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.