]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
autofs4: revert - redo lookup in ttfd
authorIan Kent <raven@themaw.net>
Thu, 24 Jul 2008 04:30:11 +0000 (21:30 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 24 Jul 2008 17:47:31 +0000 (10:47 -0700)
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>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/autofs4/root.c

index 9ead2279df4fad5b70306074ab50a2e7d66b8874..53dabe8d5b8bd85015e56a71f744190b5301a600 100644 (file)
@@ -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;
 }