io_uring: don't double complete failed reissue request
authorJens Axboe <axboe@kernel.dk>
Tue, 17 Nov 2020 14:59:16 +0000 (07:59 -0700)
committerJens Axboe <axboe@kernel.dk>
Tue, 17 Nov 2020 22:17:29 +0000 (15:17 -0700)
Zorro reports that an xfstest test case is failing, and it turns out that
for the reissue path we can potentially issue a double completion on the
request for the failure path. There's an issue around the retry as well,
but for now, at least just make sure that we handle the error path
correctly.

Cc: stable@vger.kernel.org
Fixes: b63534c41e20 ("io_uring: re-issue block requests that failed because of resources")
Reported-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c

index f05978a..b205c1d 100644 (file)
@@ -2578,7 +2578,6 @@ static bool io_resubmit_prep(struct io_kiocb *req, int error)
        }
 end_req:
        req_set_fail_links(req);
-       io_req_complete(req, ret);
        return false;
 }
 #endif