diff options
author | Ian Kent <raven@themaw.net> | 2008-07-24 00:30:11 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-24 13:47:31 -0400 |
commit | caf7da3d5d4d9dd873eb52d025d8cc63b89f1fdb (patch) | |
tree | 9e53359c28c4247eae9685a5f9c63a5c0a54a7b1 | |
parent | 5f6f4f28b6ba543beef8bad91aa6f69c7ffeee51 (diff) |
autofs4: revert - redo lookup in ttfd
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>
-rw-r--r-- | 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 9ead2279df4f..53dabe8d5b8b 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) | |||
242 | { | 242 | { |
243 | struct autofs_sb_info *sbi = autofs4_sbi(dentry->d_sb); | 243 | struct autofs_sb_info *sbi = autofs4_sbi(dentry->d_sb); |
244 | struct autofs_info *ino = autofs4_dentry_ino(dentry); | 244 | struct autofs_info *ino = autofs4_dentry_ino(dentry); |
245 | struct dentry *new; | ||
246 | int status; | 245 | int status; |
247 | 246 | ||
248 | /* Block on any pending expiry here; invalidate the dentry | 247 | /* Block on any pending expiry here; invalidate the dentry |
@@ -320,26 +319,6 @@ static int try_to_fill_dentry(struct dentry *dentry, int flags) | |||
320 | dentry->d_flags &= ~DCACHE_AUTOFS_PENDING; | 319 | dentry->d_flags &= ~DCACHE_AUTOFS_PENDING; |
321 | spin_unlock(&dentry->d_lock); | 320 | spin_unlock(&dentry->d_lock); |
322 | 321 | ||
323 | /* | ||
324 | * The dentry that is passed in from lookup may not be the one | ||
325 | * we end up using, as mkdir can create a new one. If this | ||
326 | * happens, and another process tries the lookup at the same time, | ||
327 | * it will set the PENDING flag on this new dentry, but add itself | ||
328 | * to our waitq. Then, if after the lookup succeeds, the first | ||
329 | * process that requested the mount performs another lookup of the | ||
330 | * same directory, it will show up as still pending! So, we need | ||
331 | * to redo the lookup here and clear pending on that dentry. | ||
332 | */ | ||
333 | if (d_unhashed(dentry)) { | ||
334 | new = d_lookup(dentry->d_parent, &dentry->d_name); | ||
335 | if (new) { | ||
336 | spin_lock(&new->d_lock); | ||
337 | new->d_flags &= ~DCACHE_AUTOFS_PENDING; | ||
338 | spin_unlock(&new->d_lock); | ||
339 | dput(new); | ||
340 | } | ||
341 | } | ||
342 | |||
343 | return 0; | 322 | return 0; |
344 | } | 323 | } |
345 | 324 | ||