diff mbox series

[for-next] io_uring/rw: drop -EOPNOTSUPP check in __io_complete_rw_common()

Message ID 7df73a76-d1f1-48f9-83b6-176380edafac@kernel.dk (mailing list archive)
State New
Headers show
Series [for-next] io_uring/rw: drop -EOPNOTSUPP check in __io_complete_rw_common() | expand

Commit Message

Jens Axboe Sept. 10, 2024, 2:58 p.m. UTC
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>

---
diff mbox series

Patch

diff --git a/io_uring/rw.c b/io_uring/rw.c
index d85e2d41a992..56a69f0e5d23 100644
--- a/io_uring/rw.c
+++ b/io_uring/rw.c
@@ -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.