diff options
-rw-r--r-- | fs/autofs4/autofs_i.h | 2 | ||||
-rw-r--r-- | fs/autofs4/waitq.c | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/fs/autofs4/autofs_i.h b/fs/autofs4/autofs_i.h index ff6239d57b4..617fd7b3744 100644 --- a/fs/autofs4/autofs_i.h +++ b/fs/autofs4/autofs_i.h @@ -85,7 +85,7 @@ struct autofs_wait_queue { pid_t tgid; /* This is for status reporting upon return */ int status; - atomic_t notified; + atomic_t notify; atomic_t wait_ctr; }; diff --git a/fs/autofs4/waitq.c b/fs/autofs4/waitq.c index 894d74671bd..142ab6aa2aa 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, wq->tgid = current->tgid; wq->status = -EINTR; /* Status return if interrupted */ atomic_set(&wq->wait_ctr, 2); - atomic_set(&wq->notified, 1); + atomic_set(&wq->notify, 1); mutex_unlock(&sbi->wq_mutex); } else { atomic_inc(&wq->wait_ctr); @@ -273,9 +273,11 @@ int autofs4_wait(struct autofs_sb_info *sbi, struct dentry *dentry, (unsigned long) wq->wait_queue_token, wq->len, wq->name, notify); } - if (notify != NFY_NONE && atomic_dec_and_test(&wq->notified)) { + if (notify != NFY_NONE && atomic_read(&wq->notify)) { int type; + atomic_dec(&wq->notify); + if (sbi->version < 5) { if (notify == NFY_MOUNT) type = autofs_ptype_missing; |