]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/autofs4/waitq.c
autofs4: detect invalid direct mount requests
[linux-2.6-omap-h63xx.git] / fs / autofs4 / waitq.c
index 3458dbc8fff0b1b7f2b709c819fab9cd1971977c..bcb6c5265467f4306721848e7076b327f0151aa2 100644 (file)
@@ -328,6 +328,10 @@ 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;
+
        name = kmalloc(NAME_MAX + 1, GFP_KERNEL);
        if (!name)
                return -ENOMEM;