aboutsummaryrefslogtreecommitdiff
path: root/fs/autofs4/waitq.c
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2005-06-22 20:26:47 -0500
committerSteve French <sfrench@us.ibm.com>2005-06-22 20:26:47 -0500
commitea0daab4ae4a2f853f06c76961c0ed324fd0804c (patch)
treef6fbe2db5772695181b7a7257b05e43343bd8d75 /fs/autofs4/waitq.c
parent58aab753de605c14b9878a897e7349c3063afeff (diff)
parent1bdf7a78c2b21fb94dfe7994dbe89310b18479d2 (diff)
Merge with rsync://rsync.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6.git
Diffstat (limited to 'fs/autofs4/waitq.c')
-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 5a40d36e5a5..fa2348dcd67 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,
}
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 ) {