[PATCH 6.1 36/61] io_uring: backport io_should_terminate_tw()