summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
871f943)
Fix accidental underflow of the atomic counter.
Signed-off-by: Ian Kent <raven@themaw.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
pid_t tgid;
/* This is for status reporting upon return */
int status;
pid_t tgid;
/* This is for status reporting upon return */
int status;
wq->tgid = current->tgid;
wq->status = -EINTR; /* Status return if interrupted */
atomic_set(&wq->wait_ctr, 2);
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);
mutex_unlock(&sbi->wq_mutex);
} else {
atomic_inc(&wq->wait_ctr);
(unsigned long) wq->wait_queue_token, wq->len, wq->name, notify);
}
(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)) {
+ atomic_dec(&wq->notify);
+
if (sbi->version < 5) {
if (notify == NFY_MOUNT)
type = autofs_ptype_missing;
if (sbi->version < 5) {
if (notify == NFY_MOUNT)
type = autofs_ptype_missing;