io_uring/rw: drop -EOPNOTSUPP check in __io_complete_rw_common()
authorJens Axboe <axboe@kernel.dk>
Tue, 10 Sep 2024 14:57:04 +0000 (08:57 -0600)
committerJens Axboe <axboe@kernel.dk>
Tue, 10 Sep 2024 15:34:44 +0000 (09:34 -0600)
A recent change ensured that the necessary -EOPNOTSUPP -> -EAGAIN
transformation happens inline on both the reader and writer side,
and hence there's no need to check for both of these anymore on
the completion handler side.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/rw.c

index f4d885b7c2d2a00f3de29c94f11f2c06fb257b75..f023ff49c6883cbe00aab4979e7c2fd115e5cad2 100644 (file)
@@ -467,8 +467,7 @@ static void io_req_io_end(struct io_kiocb *req)
 static bool __io_complete_rw_common(struct io_kiocb *req, long res)
 {
        if (unlikely(res != req->cqe.res)) {
-               if ((res == -EAGAIN || res == -EOPNOTSUPP) &&
-                   io_rw_should_reissue(req)) {
+               if (res == -EAGAIN && io_rw_should_reissue(req)) {
                        /*
                         * Reissue will start accounting again, finish the
                         * current cycle.