Skip to contentSkip to conversation

io_uring/rw: drop -EOPNOTSUPP check in __io_complete_rw_common()

PATCH New Jens Axboe 1 participant 1 message Sep 10, 2024 io_uring

lore
Share & tools
lore

Jens Axboe

author maintainer
#0 lore raw

PATCH 1/1 io_uring/rw: drop -EOPNOTSUPP check in __io_complete_rw_common()

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.

---

io_uring/rw.c +1 -2
index d85e2d41a992..56a69f0e5d23 100644
@@ -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.
Signature · 1 line
Jens Axboe