aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/autofs4/waitq.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/autofs4/waitq.c b/fs/autofs4/waitq.c
index 5a40d36e5a51..fa2348dcd671 100644
--- a/fs/autofs4/waitq.c
+++ b/fs/autofs4/waitq.c
@@ -191,6 +191,13 @@ int autofs4_wait(struct autofs_sb_info *sbi, struct dentry *dentry,
191 } 191 }
192 192
193 if ( !wq ) { 193 if ( !wq ) {
194 /* Can't wait for an expire if there's no mount */
195 if (notify == NFY_NONE && !d_mountpoint(dentry)) {
196 kfree(name);
197 up(&sbi->wq_sem);
198 return -ENOENT;
199 }
200
194 /* Create a new wait queue */ 201 /* Create a new wait queue */
195 wq = kmalloc(sizeof(struct autofs_wait_queue),GFP_KERNEL); 202 wq = kmalloc(sizeof(struct autofs_wait_queue),GFP_KERNEL);
196 if ( !wq ) { 203 if ( !wq ) {