summaryrefslogtreecommitdiff
path: root/fs/io_uring.c
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2020-02-29 22:56:10 +0300
committerJens Axboe <axboe@kernel.dk>2020-03-02 14:06:41 -0700
commit3b17cf5a58f2a38e23ee980b5dece717d0464fb7 (patch)
tree6b46b3d9be1a84a4d081856ca55182fcfe6e0a49 /fs/io_uring.c
parent4bc4494ec7c97ee38e2aa3d1cd76e289c49ac083 (diff)
io_uring: remove io_prep_next_work()
io-wq cares about IO_WQ_WORK_UNBOUND flag only while enqueueing, so it's useless setting it for a next req of a link. Thus, removed it from io_prep_linked_timeout(), and inline the function. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/io_uring.c')
-rw-r--r--fs/io_uring.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index d70bc7747e84..fb8fe0bd5e18 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -999,17 +999,6 @@ static inline void io_req_work_drop_env(struct io_kiocb *req)
}
}
-static inline void io_prep_next_work(struct io_kiocb *req,
- struct io_kiocb **link)
-{
- const struct io_op_def *def = &io_op_defs[req->opcode];
-
- if (!(req->flags & REQ_F_ISREG) && def->unbound_nonreg_file)
- req->work.flags |= IO_WQ_WORK_UNBOUND;
-
- *link = io_prep_linked_timeout(req);
-}
-
static inline bool io_prep_async_work(struct io_kiocb *req,
struct io_kiocb **link)
{
@@ -2581,8 +2570,8 @@ static void io_wq_assign_next(struct io_wq_work **workptr, struct io_kiocb *nxt)
{
struct io_kiocb *link;
- io_prep_next_work(nxt, &link);
*workptr = &nxt->work;
+ link = io_prep_linked_timeout(nxt);
if (link) {
nxt->work.func = io_link_work_cb;
nxt->work.data = link;