 */
static void io_uring_cancel_task_requests(struct io_ring_ctx *ctx,
					  struct files_struct *files)
{
	struct task_struct *task = current;
	bool did_park = false;

	if ((ctx->flags & IORING_SETUP_SQPOLL) && ctx->sq_data) {
		io_disable_sqo_submit(ctx);
		did_park = io_sq_thread_park(ctx->sq_data);
		if (did_park) {
			task = ctx->sq_data->thread;
			atomic_inc(&task->io_uring->in_idle);
		}
	}

	io_cancel_defer_files(ctx, task, files);

	io_uring_cancel_files(ctx, task, files);
	if (!files)
		io_uring_try_cancel_requests(ctx, task, NULL);

	if (did_park) {
		atomic_dec(&task->io_uring->in_idle);
		io_sq_thread_unpark(ctx->sq_data);
	}
 */
static void io_uring_cancel_task_requests(struct io_ring_ctx *ctx,
					  struct files_struct *files)
{
	struct task_struct *task = current;
	bool did_park = false;

	if ((ctx->flags & IORING_SETUP_SQPOLL) && ctx->sq_data) {
		io_disable_sqo_submit(ctx);
		did_park = io_sq_thread_park(ctx->sq_data);
		if (did_park) {
			task = ctx->sq_data->thread;
			atomic_inc(&task->io_uring->in_idle);
		}
	}

	io_cancel_defer_files(ctx, task, files);

	io_uring_cancel_files(ctx, task, files);
	if (!files)
		io_uring_try_cancel_requests(ctx, task, NULL);

	if (did_park) {
		atomic_dec(&task->io_uring->in_idle);
		io_sq_thread_unpark(ctx->sq_data);
	}