Skip to content
  • Jens Axboe's avatar
    eventfd: convert to f_op->read_iter() · 12aceb89
    Jens Axboe authored
    
    
    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: default avatarJens Axboe <axboe@kernel.dk>
    Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
    12aceb89