Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 24261
b: refs/heads/master
c: 3e7b191
h: refs/heads/master
i:
  24259: 2cd465b
v: v3
  • Loading branch information
Ian Kent authored and Linus Torvalds committed Mar 27, 2006
1 parent adcd071 commit f692323
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 871f94344cea36b2ce91231f442f9f9298529712
refs/heads/master: 3e7b19198003fc25b11838e709f17d4fa173b2d7
2 changes: 1 addition & 1 deletion trunk/fs/autofs4/autofs_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

Expand Down
6 changes: 4 additions & 2 deletions trunk/fs/autofs4/waitq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
Expand Down

0 comments on commit f692323

Please sign in to comment.