From 77d859913a6d31b030fbb18be5d52f721a502da7 Mon Sep 17 00:00:00 2001 From: Ian Kent Date: Tue, 21 Jun 2005 17:16:39 -0700 Subject: [PATCH] --- yaml --- r: 2542 b: refs/heads/master c: cc9acc885819696c0ed00f4f0f0cda0c7583f116 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/autofs4/waitq.c | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 4ddf625bb6af..246c657083a3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9b1e3afd6d56937ced3914971621d0f053ea9178 +refs/heads/master: cc9acc885819696c0ed00f4f0f0cda0c7583f116 diff --git a/trunk/fs/autofs4/waitq.c b/trunk/fs/autofs4/waitq.c index 5a40d36e5a51..fa2348dcd671 100644 --- a/trunk/fs/autofs4/waitq.c +++ b/trunk/fs/autofs4/waitq.c @@ -191,6 +191,13 @@ int autofs4_wait(struct autofs_sb_info *sbi, struct dentry *dentry, } 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 */ wq = kmalloc(sizeof(struct autofs_wait_queue),GFP_KERNEL); if ( !wq ) {