io_uring: mark exit side kworkers as task_work capable
There are two types of work here:
1) Fallback work, if the task is exiting
2) The exit side cancelations
and both of them may do the final fput() of a file. When this happens,
fput() will schedule delayed work. This slows down exits when io_uring
needs to wait for that work to finish. It is possible to flush this via
flush_delayed_fput(), but that's a big hammer as other unrelated files
could be involved, and from other tasks as well.
Add two io_uring helpers to temporarily clear PF_NO_TASKWORK for the
worker threads, and run any queued task_work before setting the flag
again. Then we can ensure we only flush related items that received
their final fput as part of work cancelation and flushing.
For now these are io_uring private, but could obviously be made
generically available, should there be a need to do so.
Signed-off-by: Jens Axboe <axboe@kernel.dk>