author: Pavel Begunkov <asml.silence@gmail.com> 2020-06-25 18:20:54 +0300
committer: Jens Axboe <axboe@kernel.dk> 2020-06-26 10:34:27 -0600
commit: f4db7182e0de981a3f1b356e0cf43c6815423055
parent: e883a79d8ced8e123f8c4042a29a7524c39935ab
Commit Summary:
Diffstat:
1 file changed, 3 insertions, 5 deletions
diff --git a/fs/io-wq.c b/fs/io-wq.c
index 47c5f3aeb460..72f759e1d6eb 100644
--- a/fs/io-wq.c
+++ b/fs/io-wq.c
@@ -523,9 +523,8 @@ get_next:
work->flags |= IO_WQ_WORK_CANCEL;
hash = io_get_work_hash(work);
- linked = old_work = work;
- wq->do_work(&linked);
- linked = (old_work == linked) ? NULL : linked;
+ old_work = work;
+ linked = wq->do_work(work);
work = next_hashed;
if (!work && linked && !io_wq_is_hashed(linked)) {
@@ -781,8 +780,7 @@ static void io_run_cancel(struct io_wq_work *work, struct io_wqe *wqe)
struct io_wq_work *old_work = work;
work->flags |= IO_WQ_WORK_CANCEL;
- wq->do_work(&work);
- work = (work == old_work) ? NULL : work;
+ work = wq->do_work(work);
wq->free_work(old_work);
} while (work);
}