aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/autofs4/autofs_i.h2
-rw-r--r--fs/autofs4/waitq.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/fs/autofs4/autofs_i.h b/fs/autofs4/autofs_i.h
index ff6239d57b4b..617fd7b37447 100644
--- a/fs/autofs4/autofs_i.h
+++ b/fs/autofs4/autofs_i.h
@@ -85,7 +85,7 @@ struct autofs_wait_queue {
85 pid_t tgid; 85 pid_t tgid;
86 /* This is for status reporting upon return */ 86 /* This is for status reporting upon return */
87 int status; 87 int status;
88 atomic_t notified; 88 atomic_t notify;
89 atomic_t wait_ctr; 89 atomic_t wait_ctr;
90}; 90};
91 91
diff --git a/fs/autofs4/waitq.c b/fs/autofs4/waitq.c
index 894d74671bd0..142ab6aa2aa1 100644
--- a/fs/autofs4/waitq.c
+++ b/fs/autofs4/waitq.c
@@ -263,7 +263,7 @@ int autofs4_wait(struct autofs_sb_info *sbi, struct dentry *dentry,
263 wq->tgid = current->tgid; 263 wq->tgid = current->tgid;
264 wq->status = -EINTR; /* Status return if interrupted */ 264 wq->status = -EINTR; /* Status return if interrupted */
265 atomic_set(&wq->wait_ctr, 2); 265 atomic_set(&wq->wait_ctr, 2);
266 atomic_set(&wq->notified, 1); 266 atomic_set(&wq->notify, 1);
267 mutex_unlock(&sbi->wq_mutex); 267 mutex_unlock(&sbi->wq_mutex);
268 } else { 268 } else {
269 atomic_inc(&wq->wait_ctr); 269 atomic_inc(&wq->wait_ctr);
@@ -273,9 +273,11 @@ int autofs4_wait(struct autofs_sb_info *sbi, struct dentry *dentry,
273 (unsigned long) wq->wait_queue_token, wq->len, wq->name, notify); 273 (unsigned long) wq->wait_queue_token, wq->len, wq->name, notify);
274 } 274 }
275 275
276 if (notify != NFY_NONE && atomic_dec_and_test(&wq->notified)) { 276 if (notify != NFY_NONE && atomic_read(&wq->notify)) {
277 int type; 277 int type;
278 278
279 atomic_dec(&wq->notify);
280
279 if (sbi->version < 5) { 281 if (sbi->version < 5) {
280 if (notify == NFY_MOUNT) 282 if (notify == NFY_MOUNT)
281 type = autofs_ptype_missing; 283 type = autofs_ptype_missing;