Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105456
b: refs/heads/master
c: caf7da3
h: refs/heads/master
v: v3
  • Loading branch information
Ian Kent authored and Linus Torvalds committed Jul 24, 2008
1 parent 42df4ee commit 48f4ce2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5f6f4f28b6ba543beef8bad91aa6f69c7ffeee51
refs/heads/master: caf7da3d5d4d9dd873eb52d025d8cc63b89f1fdb
21 changes: 0 additions & 21 deletions trunk/fs/autofs4/root.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 48f4ce2

Please sign in to comment.