io_uring: handle TIF_NOTIFY_RESUME when checking for task_work
authorJens Axboe <axboe@kernel.dk>
Mon, 6 Mar 2023 20:15:06 +0000 (13:15 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:40:03 +0000 (09:40 +0100)
commit54df6c5edf87df71f8a144ee6e0f04cde180aea2
treeb3e75578dedecf153220573cb64168647de2641d
parent7697139d5dfd491f4c495a914a1dd68f6e827a0f
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.c