summaryrefslogtreecommitdiffstats
path: root/fs/eventfd.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-12-31 16:42:48 +0100
committerChristoph Hellwig <hch@lst.de>2018-05-26 09:16:44 +0200
commit9e42f195f5b5cae4cf8ec71432c0fdaf641d1b73 (patch)
tree0f301ef42421c1581d214dc84cb46e0eed15c37c /fs/eventfd.c
parentdd67081b36a1fb41f632e2fe69992786396c9e77 (diff)
downloadlinux-stable-9e42f195f5b5cae4cf8ec71432c0fdaf641d1b73.tar.gz
linux-stable-9e42f195f5b5cae4cf8ec71432c0fdaf641d1b73.tar.bz2
linux-stable-9e42f195f5b5cae4cf8ec71432c0fdaf641d1b73.zip
eventfd: switch to ->poll_mask
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/eventfd.c')
-rw-r--r--fs/eventfd.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/fs/eventfd.c b/fs/eventfd.c
index 08d3bd602f73..61c9514da5e9 100644
--- a/fs/eventfd.c
+++ b/fs/eventfd.c
@@ -101,14 +101,20 @@ static int eventfd_release(struct inode *inode, struct file *file)
return 0;
}
-static __poll_t eventfd_poll(struct file *file, poll_table *wait)
+static struct wait_queue_head *
+eventfd_get_poll_head(struct file *file, __poll_t events)
+{
+ struct eventfd_ctx *ctx = file->private_data;
+
+ return &ctx->wqh;
+}
+
+static __poll_t eventfd_poll_mask(struct file *file, __poll_t eventmask)
{
struct eventfd_ctx *ctx = file->private_data;
__poll_t events = 0;
u64 count;
- poll_wait(file, &ctx->wqh, wait);
-
/*
* All writes to ctx->count occur within ctx->wqh.lock. This read
* can be done outside ctx->wqh.lock because we know that poll_wait
@@ -305,7 +311,8 @@ static const struct file_operations eventfd_fops = {
.show_fdinfo = eventfd_show_fdinfo,
#endif
.release = eventfd_release,
- .poll = eventfd_poll,
+ .get_poll_head = eventfd_get_poll_head,
+ .poll_mask = eventfd_poll_mask,
.read = eventfd_read,
.write = eventfd_write,
.llseek = noop_llseek,