All of lore.kernel.org
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Trond Myklebust <trond@netapp.com>
Cc: linux-nfs@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: DCACHE_DISCONNECTED use in try_to_ascend/d_kill
Date: Thu, 12 Jul 2012 18:40:08 -0400	[thread overview]
Message-ID: <20120712224008.GF24162@fieldses.org> (raw)
In-Reply-To: <20120712222849.GE24162@fieldses.org>

On Thu, Jul 12, 2012 at 06:28:49PM -0400, bfields wrote:
> I've been trying to figure out if we can pare down DCACHE_DISCONNECTED
> uses to only those required by exportfs, and ran across this one.

There's also one DCACHE_DISCONNECTED use in fs/nfs/dir.c that I was
hoping could be eliminated.  It was added by Al with
d9e80b7de91db05c1c4d2e5ebbfd70b3b3ba0e0f.  It looks totally theoretical
to me (nfs isn't exportable, hence shouldn't see DCACHE_DISCONNECTED
dentries), but maybe I'm missing something.

At a minimum maybe we could pull a comment out of Al's commit?:

--b.

diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index f430057..b96c687 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -1194,6 +1194,12 @@ out_zap_parent:
 		/* If we have submounts, don't unhash ! */
 		if (have_submounts(dentry))
 			goto out_valid;
+		/*
+		 * We can't d_drop the root of a disconnected tree:
+		 * its d_hash is on the s_anon list and d_drop() would hide
+		 * it from shrink_dcache_for_unmount(), leading to busy
+		 * inodes on unmount and further oopses.
+		 */
 		if (dentry->d_flags & DCACHE_DISCONNECTED)
 			goto out_valid;
 		shrink_dcache_parent(dentry);

  reply	other threads:[~2012-07-12 22:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-12 22:28 DCACHE_DISCONNECTED use in try_to_ascend/d_kill J. Bruce Fields
2012-07-12 22:40 ` J. Bruce Fields [this message]
2012-07-13 11:55   ` 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=20120712224008.GF24162@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trond@netapp.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.