• Pavel Begunkov's avatar
    io_uring: move poll update into remove not add · c5de0036
    Pavel Begunkov authored
    Having poll update function as a part of IORING_OP_POLL_ADD is not
    great, we have to do hack around struct layouts and add some overhead in
    the way of more popular POLL_ADD. Even more serious drawback is that
    POLL_ADD requires file and always grabs it, and so poll update, which
    doesn't need it.
    
    Incorporate poll update into IORING_OP_POLL_REMOVE instead of
    IORING_OP_POLL_ADD. It also more consistent with timeout remove/update.
    
    Fixes: b69de288 ("io_uring: allow events and user_data update of running poll requests")
    Signed-off-by: default avatarPavel Begunkov <asml.silence@gmail.com>
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    c5de0036
io_uring.c 242 KB