diff --git a/fs/io_uring.c b/fs/io_uring.c
index 38c6cbe1ab387d8d50560dd71e9f6008d6566764..5d3348d66f068cc9f9bf75a7aafacb2d656dbd45 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -8982,12 +8982,6 @@ static void io_uring_cancel_task_requests(struct io_ring_ctx *ctx,
 
 	if ((ctx->flags & IORING_SETUP_SQPOLL) && ctx->sq_data) {
 		atomic_dec(&task->io_uring->in_idle);
-		/*
-		 * If the files that are going away are the ones in the thread
-		 * identity, clear them out.
-		 */
-		if (task->io_uring->identity->files == files)
-			task->io_uring->identity->files = NULL;
 		io_sq_thread_unpark(ctx->sq_data);
 	}
 }