Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105468
b: refs/heads/master
c: c72305b
h: refs/heads/master
v: v3
  • Loading branch information
Ian Kent authored and Linus Torvalds committed Jul 24, 2008
1 parent f04907b commit 1a3d79a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 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: eb3b176796b0e53fd26fce86847231542eb0d198
refs/heads/master: c72305b5472522299bb6f45b736080128eb1c822
17 changes: 14 additions & 3 deletions trunk/fs/autofs4/waitq.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,9 +328,20 @@ int autofs4_wait(struct autofs_sb_info *sbi, struct dentry *dentry,
if (sbi->catatonic)
return -ENOENT;

if (!dentry->d_inode &&
(sbi->type & (AUTOFS_TYPE_DIRECT | AUTOFS_TYPE_OFFSET)))
return -ENOENT;
if (!dentry->d_inode) {
/*
* A wait for a negative dentry is invalid for certain
* cases. A direct or offset mount "always" has its mount
* point directory created and so the request dentry must
* be positive or the map key doesn't exist. The situation
* is very similar for indirect mounts except only dentrys
* in the root of the autofs file system may be negative.
*/
if (sbi->type & (AUTOFS_TYPE_DIRECT|AUTOFS_TYPE_OFFSET))
return -ENOENT;
else if (!IS_ROOT(dentry->d_parent))
return -ENOENT;
}

name = kmalloc(NAME_MAX + 1, GFP_KERNEL);
if (!name)
Expand Down

0 comments on commit 1a3d79a

Please sign in to comment.