Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 231520
b: refs/heads/master
c: 9e3fea1
h: refs/heads/master
v: v3
  • Loading branch information
Ian Kent authored and Al Viro committed Jan 16, 2011
1 parent c6c6122 commit 3540be8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 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: 6651149371b842715906311b4631b8489cebf7e8
refs/heads/master: 9e3fea16ba386fa549a0b2de8a203e5d412997a0
17 changes: 16 additions & 1 deletion trunk/fs/autofs4/waitq.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,15 +309,30 @@ static int validate_request(struct autofs_wait_queue **wait,
* completed while we waited on the mutex ...
*/
if (notify == NFY_MOUNT) {
struct dentry *new = NULL;
int valid = 1;

/*
* If the dentry was successfully mounted while we slept
* on the wait queue mutex we can return success. If it
* isn't mounted (doesn't have submounts for the case of
* a multi-mount with no mount at it's base) we can
* continue on and create a new request.
*/
if (!IS_ROOT(dentry)) {
if (dentry->d_inode && d_unhashed(dentry)) {
struct dentry *parent = dentry->d_parent;
new = d_lookup(parent, &dentry->d_name);
if (new)
dentry = new;
}
}
if (have_submounts(dentry))
return 0;
valid = 0;

if (new)
dput(new);
return valid;
}

return 1;
Expand Down

0 comments on commit 3540be8

Please sign in to comment.