diff options
Diffstat (limited to 'fs/autofs4')
-rw-r--r-- | fs/autofs4/waitq.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/autofs4/waitq.c b/fs/autofs4/waitq.c index e1fbdeef85db..c13273afd546 100644 --- a/fs/autofs4/waitq.c +++ b/fs/autofs4/waitq.c | |||
@@ -257,6 +257,9 @@ static int validate_request(struct autofs_wait_queue **wait, | |||
257 | struct autofs_wait_queue *wq; | 257 | struct autofs_wait_queue *wq; |
258 | struct autofs_info *ino; | 258 | struct autofs_info *ino; |
259 | 259 | ||
260 | if (sbi->catatonic) | ||
261 | return -ENOENT; | ||
262 | |||
260 | /* Wait in progress, continue; */ | 263 | /* Wait in progress, continue; */ |
261 | wq = autofs4_find_wait(sbi, qstr); | 264 | wq = autofs4_find_wait(sbi, qstr); |
262 | if (wq) { | 265 | if (wq) { |
@@ -289,6 +292,9 @@ static int validate_request(struct autofs_wait_queue **wait, | |||
289 | if (mutex_lock_interruptible(&sbi->wq_mutex)) | 292 | if (mutex_lock_interruptible(&sbi->wq_mutex)) |
290 | return -EINTR; | 293 | return -EINTR; |
291 | 294 | ||
295 | if (sbi->catatonic) | ||
296 | return -ENOENT; | ||
297 | |||
292 | wq = autofs4_find_wait(sbi, qstr); | 298 | wq = autofs4_find_wait(sbi, qstr); |
293 | if (wq) { | 299 | if (wq) { |
294 | *wait = wq; | 300 | *wait = wq; |
@@ -389,7 +395,7 @@ int autofs4_wait(struct autofs_sb_info *sbi, struct dentry *dentry, | |||
389 | 395 | ||
390 | ret = validate_request(&wq, sbi, &qstr, dentry, notify); | 396 | ret = validate_request(&wq, sbi, &qstr, dentry, notify); |
391 | if (ret <= 0) { | 397 | if (ret <= 0) { |
392 | if (ret == 0) | 398 | if (ret != -EINTR) |
393 | mutex_unlock(&sbi->wq_mutex); | 399 | mutex_unlock(&sbi->wq_mutex); |
394 | kfree(qstr.name); | 400 | kfree(qstr.name); |
395 | return ret; | 401 | return ret; |