io_uring: abstract out task work running
authorJens Axboe <axboe@kernel.dk>
Tue, 11 Aug 2020 16:45:45 +0000 (12:45 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Aug 2020 06:23:24 +0000 (08:23 +0200)
commit903f120e0f213ff4dbf560949ecc6bf30fffb2b6
tree4bf4e86369bb0b35f8970f57794361dd8ec51875
parentd870e37f9f1d7433a4469b3bb6127e5af39a40e3
io_uring: abstract out task work running

[ Upstream commit 4c6e277c4cc4a6b3b2b9c66a7b014787ae757cc1 ]

Provide a helper to run task_work instead of checking and running
manually in a bunch of different spots. While doing so, also move the
task run state setting where we run the task work. Then we can move it
out of the callback helpers. This also helps ensure we only do this once
per task_work list run, not per task_work item.

Suggested-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/io_uring.c