diff options
author | Jens Axboe <axboe@kernel.dk> | 2019-11-12 07:56:39 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-11-12 08:02:26 -0700 |
commit | 960e432dfa5927892a9b170d14de874597b84849 (patch) | |
tree | 5f349118f3b4de3fcc35836f392f8ffbec440cca /fs/io_uring.c | |
parent | 76a46e066e2d93bd333599d1c84c605c2c4cc909 (diff) |
io_uring: use correct "is IO worker" helper
Since we switched to io-wq, the dependent link optimization for when to
pass back work inline has been broken. Fix this by providing a suitable
io-wq helper for io_uring to use to detect when to do this.
Fixes: 561fb04a6a22 ("io_uring: replace workqueue usage with io-wq")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/io_uring.c')
-rw-r--r-- | fs/io_uring.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c index ad7f569319c2..3c573f0578a8 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -872,7 +872,7 @@ static void io_req_link_next(struct io_kiocb *req, struct io_kiocb **nxtptr) /* we dropped this link, get next */ nxt = list_first_entry_or_null(&req->link_list, struct io_kiocb, list); - } else if (nxtptr && current_work()) { + } else if (nxtptr && io_wq_current_is_worker()) { *nxtptr = nxt; break; } else { |