]> git.baikalelectronics.ru Git - kernel.git/commit
eventfd: only return events requested in poll_mask()
authorAvi Kivity <avi@scylladb.com>
Fri, 8 Jun 2018 19:12:32 +0000 (22:12 +0300)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 15 Jun 2018 00:07:38 +0000 (20:07 -0400)
commit95619a69626db3326e8eb360e9292401057df4e9
treedc24bf35b539ea641b700344820c84462751bfd7
parent2eff30a84a1a59b8c78f38a2843bfc35ae664767
eventfd: only return events requested in poll_mask()

The ->poll_mask() operation has a mask of events that the caller
is interested in, but we're returning all events regardless.

Change to return only the events the caller is interested in. This
fixes aio IO_CMD_POLL returning immediately when called with POLLIN
on an eventfd, since an eventfd is almost always ready for a write.

Signed-off-by: Avi Kivity <avi@scylladb.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/eventfd.c