io_uring: don't io_prep_async_work() linked reqs
authorPavel Begunkov <asml.silence@gmail.com>
Sat, 10 Oct 2020 17:34:05 +0000 (18:34 +0100)
committerJens Axboe <axboe@kernel.dk>
Sat, 10 Oct 2020 18:49:20 +0000 (12:49 -0600)
There is no real reason left for preparing io-wq work context for linked
requests in advance, remove it as this might become a bottleneck in some
cases.

Reported-by: Roman Gershman <romger@amazon.com>
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c

index 09494ca..272abe0 100644 (file)
@@ -5672,9 +5672,6 @@ static int io_req_defer_prep(struct io_kiocb *req,
        ret = io_prep_work_files(req);
        if (unlikely(ret))
                return ret;
-
-       io_prep_async_work(req);
-
        return io_req_prep(req, sqe);
 }