diff options
-rw-r--r-- | fs/autofs4/waitq.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/autofs4/waitq.c b/fs/autofs4/waitq.c index 3458dbc8fff0..bcb6c5265467 100644 --- a/fs/autofs4/waitq.c +++ b/fs/autofs4/waitq.c | |||
@@ -328,6 +328,10 @@ int autofs4_wait(struct autofs_sb_info *sbi, struct dentry *dentry, | |||
328 | if (sbi->catatonic) | 328 | if (sbi->catatonic) |
329 | return -ENOENT; | 329 | return -ENOENT; |
330 | 330 | ||
331 | if (!dentry->d_inode && | ||
332 | (sbi->type & (AUTOFS_TYPE_DIRECT | AUTOFS_TYPE_OFFSET))) | ||
333 | return -ENOENT; | ||
334 | |||
331 | name = kmalloc(NAME_MAX + 1, GFP_KERNEL); | 335 | name = kmalloc(NAME_MAX + 1, GFP_KERNEL); |
332 | if (!name) | 336 | if (!name) |
333 | return -ENOMEM; | 337 | return -ENOMEM; |