diff --git a/fs/io_uring.c b/fs/io_uring.c index 13d087ebe057425360e1ff82a0b7f0afa84850c0..962a3580c49fdf7ca20db7cf644aa1c019966dfe 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -4955,6 +4955,9 @@ static void io_poll_complete(struct io_kiocb *req, __poll_t mask, int error) { struct io_ring_ctx *ctx = req->ctx; + if (!error && req->poll.canceled) + error = -ECANCELED; + io_poll_remove_double(req); req->poll.done = true; io_cqring_fill_event(req, error ? error : mangle_poll(mask));