linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] Revert "eventfd: only return events requested in poll_mask()"
@ 2018-06-17  8:31 Avi Kivity
  2018-06-19  5:15 ` Christoph Hellwig
  0 siblings, 1 reply; 2+ messages in thread
From: Avi Kivity @ 2018-06-17  8:31 UTC (permalink / raw)
  To: Alexander Viro; +Cc: hch, linux-fsdevel, linux-kernel

This reverts commit 4d572d9f46507be8cfe326aa5bc3698babcbdfa7. It is
superceded by the more general
2739b807b0885a09996659be82f813af219c7360 ("aio: only return events
requested in poll_mask() for IOCB_CMD_POLL"). Unfortunately, hch
nacked it on the bug report rather than on the patch itself, so it
was picked up.
---
 fs/eventfd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/eventfd.c b/fs/eventfd.c
index ceb1031f1cac..61c9514da5e9 100644
--- a/fs/eventfd.c
+++ b/fs/eventfd.c
@@ -154,15 +154,15 @@ static __poll_t eventfd_poll_mask(struct file *file, __poll_t eventmask)
 	 *     eventfd_poll returns 0
 	 */
 	count = READ_ONCE(ctx->count);
 
 	if (count > 0)
-		events |= (EPOLLIN & eventmask);
+		events |= EPOLLIN;
 	if (count == ULLONG_MAX)
 		events |= EPOLLERR;
 	if (ULLONG_MAX - 1 > count)
-		events |= (EPOLLOUT & eventmask);
+		events |= EPOLLOUT;
 
 	return events;
 }
 
 static void eventfd_ctx_do_read(struct eventfd_ctx *ctx, __u64 *cnt)
-- 
2.14.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v1] Revert "eventfd: only return events requested in poll_mask()"
  2018-06-17  8:31 [PATCH v1] Revert "eventfd: only return events requested in poll_mask()" Avi Kivity
@ 2018-06-19  5:15 ` Christoph Hellwig
  0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2018-06-19  5:15 UTC (permalink / raw)
  To: Avi Kivity; +Cc: Alexander Viro, hch, linux-fsdevel, linux-kernel

On Sun, Jun 17, 2018 at 11:31:41AM +0300, Avi Kivity wrote:
> This reverts commit 4d572d9f46507be8cfe326aa5bc3698babcbdfa7. It is
> superceded by the more general
> 2739b807b0885a09996659be82f813af219c7360 ("aio: only return events
> requested in poll_mask() for IOCB_CMD_POLL"). Unfortunately, hch
> nacked it on the bug report rather than on the patch itself, so it
> was picked up.

Note that even with that patch this patch is harmless, although indeed
not actually needed.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-06-19  5:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-17  8:31 [PATCH v1] Revert "eventfd: only return events requested in poll_mask()" Avi Kivity
2018-06-19  5:15 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).