io_uring: abstract out task work running
authorJens Axboe <axboe@kernel.dk>
Wed, 1 Jul 2020 17:29:10 +0000 (11:29 -0600)
committerJens Axboe <axboe@kernel.dk>
Sun, 5 Jul 2020 21:05:22 +0000 (15:05 -0600)
commit4c6e277c4cc4a6b3b2b9c66a7b014787ae757cc1
tree0065f60d48c45304d78842264fd9375685469d63
parent58c6a581decbcdd7f49eb7cab27ee14cef247fd5
io_uring: abstract out task work running

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>
fs/io_uring.c