@@ -318,7 +318,7 @@ static void io_worker_handle_work(struct io_worker *worker)
work->flags |= IO_WQ_WORK_HAS_MM;
old_work = work;
- work->func(&work);
+ work->func(wq, &work);
spin_lock_irq(&wqe->lock);
worker->cur_work = NULL;
@@ -685,7 +685,7 @@ static enum io_wq_cancel io_wqe_cancel_cb_work(struct io_wqe *wqe,
if (found) {
work->flags |= IO_WQ_WORK_CANCEL;
- work->func(&work);
+ work->func(wqe->wq, &work);
return IO_WQ_CANCEL_OK;
}
@@ -757,7 +757,7 @@ static enum io_wq_cancel io_wqe_cancel_work(struct io_wqe *wqe,
if (found) {
work->flags |= IO_WQ_WORK_CANCEL;
- work->func(&work);
+ work->func(wqe->wq, &work);
return IO_WQ_CANCEL_OK;
}
@@ -801,7 +801,7 @@ struct io_wq_flush_data {
struct completion done;
};
-static void io_wq_flush_func(struct io_wq_work **workptr)
+static void io_wq_flush_func(struct io_wq *wq, struct io_wq_work **workptr)
{
struct io_wq_work *work = *workptr;
struct io_wq_flush_data *data;
@@ -21,7 +21,7 @@ enum io_wq_cancel {
struct io_wq_work {
struct list_head list;
- void (*func)(struct io_wq_work **);
+ void (*func)(struct io_wq *, struct io_wq_work **);
unsigned flags;
struct files_struct *files;
};
@@ -369,7 +369,7 @@ struct io_submit_state {
unsigned int ios_left;
};
-static void io_wq_submit_work(struct io_wq_work **workptr);
+static void io_wq_submit_work(struct io_wq *wq, struct io_wq_work **workptr);
static void io_cqring_fill_event(struct io_ring_ctx *ctx, u64 ki_user_data,
long res);
static void __io_free_req(struct io_kiocb *req);
@@ -1930,7 +1930,7 @@ static void io_poll_complete(struct io_ring_ctx *ctx, struct io_kiocb *req,
io_commit_cqring(ctx);
}
-static void io_poll_complete_work(struct io_wq_work **workptr)
+static void io_poll_complete_work(struct io_wq *wq, struct io_wq_work **workptr)
{
struct io_wq_work *work = *workptr;
struct io_kiocb *req = container_of(work, struct io_kiocb, work);
@@ -2436,7 +2436,7 @@ static int __io_submit_sqe(struct io_ring_ctx *ctx, struct io_kiocb *req,
return 0;
}
-static void io_wq_submit_work(struct io_wq_work **workptr)
+static void io_wq_submit_work(struct io_wq *wq, struct io_wq_work **workptr)
{
struct io_wq_work *work = *workptr;
struct io_kiocb *req = container_of(work, struct io_kiocb, work);
This is the io_wq that the work is executing on. No functional changes in this patch, we'll need this in a future patch. Signed-off-by: Jens Axboe <axboe@kernel.dk> --- fs/io-wq.c | 8 ++++---- fs/io-wq.h | 2 +- fs/io_uring.c | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-)