Commit 395108880efff4a4ffa1ffa554477f7f5ba6a031

Authored by Davide Libenzi
Committed by Linus Torvalds
1 parent 2dfa4eeab0

epoll keyed wakeups: make eventfd use keyed wakeups

Introduce keyed event wakeups inside the eventfd code.

Signed-off-by: Davide Libenzi <davidel@xmailserver.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: David Miller <davem@davemloft.net>
Cc: William Lee Irwin III <wli@movementarian.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 1 changed file with 3 additions and 3 deletions Side-by-side Diff

... ... @@ -51,7 +51,7 @@
51 51 n = (int) (ULLONG_MAX - ctx->count);
52 52 ctx->count += n;
53 53 if (waitqueue_active(&ctx->wqh))
54   - wake_up_locked(&ctx->wqh);
  54 + wake_up_locked_poll(&ctx->wqh, POLLIN);
55 55 spin_unlock_irqrestore(&ctx->wqh.lock, flags);
56 56  
57 57 return n;
... ... @@ -120,7 +120,7 @@
120 120 ucnt = (ctx->flags & EFD_SEMAPHORE) ? 1 : ctx->count;
121 121 ctx->count -= ucnt;
122 122 if (waitqueue_active(&ctx->wqh))
123   - wake_up_locked(&ctx->wqh);
  123 + wake_up_locked_poll(&ctx->wqh, POLLOUT);
124 124 }
125 125 spin_unlock_irq(&ctx->wqh.lock);
126 126 if (res > 0 && put_user(ucnt, (__u64 __user *) buf))
... ... @@ -169,7 +169,7 @@
169 169 if (likely(res > 0)) {
170 170 ctx->count += ucnt;
171 171 if (waitqueue_active(&ctx->wqh))
172   - wake_up_locked(&ctx->wqh);
  172 + wake_up_locked_poll(&ctx->wqh, POLLIN);
173 173 }
174 174 spin_unlock_irq(&ctx->wqh.lock);
175 175