|
@@ -191,6 +191,13 @@ int autofs4_wait(struct autofs_sb_info *sbi, struct dentry *dentry,
|
|
}
|
|
}
|
|
|
|
|
|
if ( !wq ) {
|
|
if ( !wq ) {
|
|
|
|
+ /* Can't wait for an expire if there's no mount */
|
|
|
|
+ if (notify == NFY_NONE && !d_mountpoint(dentry)) {
|
|
|
|
+ kfree(name);
|
|
|
|
+ up(&sbi->wq_sem);
|
|
|
|
+ return -ENOENT;
|
|
|
|
+ }
|
|
|
|
+
|
|
/* Create a new wait queue */
|
|
/* Create a new wait queue */
|
|
wq = kmalloc(sizeof(struct autofs_wait_queue),GFP_KERNEL);
|
|
wq = kmalloc(sizeof(struct autofs_wait_queue),GFP_KERNEL);
|
|
if ( !wq ) {
|
|
if ( !wq ) {
|