io_uring: move poll update into remove not add
authorPavel Begunkov <asml.silence@gmail.com>
Wed, 14 Apr 2021 12:38:37 +0000 (13:38 +0100)
committerJens Axboe <axboe@kernel.dk>
Wed, 14 Apr 2021 16:43:49 +0000 (10:43 -0600)
commitc5de00366e3e675f9e321983d9bd357c1fbea0e9
tree3bee5f7bbba3fb8230cab35b882165519e66d8f6
parent9096af3e9c8734a34703bd9fb5ab14292296f911
io_uring: move poll update into remove not add

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: b69de288e913 ("io_uring: allow events and user_data update of running poll requests")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c