mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ian Kent <raven@themaw.net>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Kernel Mailing List <linux-kernel@vger.kernel.org>,
	autofs mailing list <autofs@linux.kernel.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: [PATCH 2/7] autofs4 - revert - redo lookup in ttfd
Date: Tue, 17 Jun 2008 20:23:44 +0800	[thread overview]
Message-ID: <20080617122344.14725.11503.stgit@raven.themaw.net> (raw)
In-Reply-To: <20080617122336.14725.64829.stgit@raven.themaw.net>

This patch series enables the use of a single dentry for lookups
prior to the dentry being hashed and so we no longer need to
redo the lookup. This patch reverts the patch of commit
033790449ba9c4dcf8478a87693d33df625c23b5.

Signed-off-by: Ian Kent <raven@themaw.net>

---

 fs/autofs4/root.c |   21 ---------------------
 1 files changed, 0 insertions(+), 21 deletions(-)


diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c
index 2e8959c..8511cb2 100644
--- a/fs/autofs4/root.c
+++ b/fs/autofs4/root.c
@@ -242,7 +242,6 @@ static int try_to_fill_dentry(struct dentry *dentry, int flags)
 {
 	struct autofs_sb_info *sbi = autofs4_sbi(dentry->d_sb);
 	struct autofs_info *ino = autofs4_dentry_ino(dentry);
-	struct dentry *new;
 	int status;
 
 	/* Block on any pending expiry here; invalidate the dentry
@@ -320,26 +319,6 @@ static int try_to_fill_dentry(struct dentry *dentry, int flags)
 	dentry->d_flags &= ~DCACHE_AUTOFS_PENDING;
 	spin_unlock(&dentry->d_lock);
 
-	/*
-	 * The dentry that is passed in from lookup may not be the one
-	 * we end up using, as mkdir can create a new one.  If this
-	 * happens, and another process tries the lookup at the same time,
-	 * it will set the PENDING flag on this new dentry, but add itself
-	 * to our waitq.  Then, if after the lookup succeeds, the first
-	 * process that requested the mount performs another lookup of the
-	 * same directory, it will show up as still pending!  So, we need
-	 * to redo the lookup here and clear pending on that dentry.
-	 */
-	if (d_unhashed(dentry)) {
-		new = d_lookup(dentry->d_parent, &dentry->d_name);
-		if (new) {
-			spin_lock(&new->d_lock);
-			new->d_flags &= ~DCACHE_AUTOFS_PENDING;
-			spin_unlock(&new->d_lock);
-			dput(new);
-		}
-	}
-
 	return 0;
 }
 

  reply	other threads:[~2008-06-17 12:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-17 12:23 [PATCH 1/7] autofs4 - don't make expiring dentry negative Ian Kent
2008-06-17 12:23 ` Ian Kent [this message]
2008-06-17 12:23 ` [PATCH 3/7] autofs4 - use look aside list for lookups Ian Kent
2008-06-17 12:23 ` [PATCH 4/7] autofs4 - don't release directory mutex if called in oz_mode Ian Kent
2008-06-17 12:24 ` [PATCH 5/7] autofs4 - use lookup intent flags to trigger mounts Ian Kent
2008-06-17 12:24 ` [PATCH 6/7] autofs4 - use struct qstr in waitq.c Ian Kent
2008-07-22 23:13   ` Andrew Morton
2008-07-23  5:08     ` Ian Kent
2008-07-23  5:17       ` Andrew Morton
2008-07-23  5:24         ` Ian Kent
2008-06-17 12:24 ` [PATCH 7/7] autofs4 - fix pending mount race Ian Kent
2008-07-01  7:04   ` Andrew Morton

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=20080617122344.14725.11503.stgit@raven.themaw.net \
    --to=raven@themaw.net \
    --cc=akpm@linux-foundation.org \
    --cc=autofs@linux.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®