io_uring: handle TIF_NOTIFY_RESUME when checking for task_work
authorJens Axboe <axboe@kernel.dk>
Tue, 24 Jan 2023 15:24:25 +0000 (08:24 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:34:03 +0000 (09:34 +0100)
commit4c13c6a080ec7b9b9062a6d07e47b7e539c7ff59
tree1107b5a30be8b13e52b050ee9e283c2c26bf5c10
parentc981a035dff031925855c0195e66e157d3ea1e76
io_uring: handle TIF_NOTIFY_RESUME when checking for task_work

commit b5d3ae202fbfe055aa2a8ae8524531ee1dcab717 upstream.

If TIF_NOTIFY_RESUME is set, then we need to call resume_user_mode_work()
for PF_IO_WORKER threads. They never return to usermode, hence never get
a chance to process any items that are marked by this flag. Most notably
this includes the final put of files, but also any throttling markers set
by block cgroups.

Cc: stable@vger.kernel.org # 5.10+
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
io_uring/io_uring.h