eventfd: convert to f_op->read_iter()
authorJens Axboe <axboe@kernel.dk>
Fri, 1 May 2020 19:11:09 +0000 (13:11 -0600)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 7 May 2020 02:33:43 +0000 (22:33 -0400)
commit12aceb89b0bce19eb89735f9de7a9983e4f0adae
tree4c16eb79da308c962eb7e586e741275d9085a3a7
parent8f3d9f354286745c751374f5f1fcafee6b3f3136
eventfd: convert to f_op->read_iter()

eventfd is using ->read() as it's file_operations read handler, but
this prevents passing in information about whether a given IO operation
is blocking or not. We can only use the file flags for that. To support
async (-EAGAIN/poll based) retries for io_uring, we need ->read_iter()
support. Convert eventfd to using ->read_iter().

With ->read_iter(), we can support IOCB_NOWAIT. Ensure the fd setup
is done such that we set file->f_mode with FMODE_NOWAIT.

[missing include added]

Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/eventfd.c