@@ -8914,52 +8914,6 @@ void __io_uring_task_cancel(void)
89148914 __io_uring_free (current );
89158915}
89168916
8917- static int io_uring_flush (struct file * file , void * data )
8918- {
8919- struct io_uring_task * tctx = current -> io_uring ;
8920- struct io_ring_ctx * ctx = file -> private_data ;
8921-
8922- /* Ignore helper thread files exit */
8923- if (current -> flags & PF_IO_WORKER )
8924- return 0 ;
8925-
8926- if (fatal_signal_pending (current ) || (current -> flags & PF_EXITING )) {
8927- io_uring_cancel_task_requests (ctx , NULL );
8928- io_req_caches_free (ctx );
8929- }
8930-
8931- io_run_ctx_fallback (ctx );
8932-
8933- if (!tctx )
8934- return 0 ;
8935-
8936- /* we should have cancelled and erased it before PF_EXITING */
8937- WARN_ON_ONCE ((current -> flags & PF_EXITING ) &&
8938- xa_load (& tctx -> xa , (unsigned long )file ));
8939-
8940- /*
8941- * fput() is pending, will be 2 if the only other ref is our potential
8942- * task file note. If the task is exiting, drop regardless of count.
8943- */
8944- if (atomic_long_read (& file -> f_count ) != 2 )
8945- return 0 ;
8946-
8947- if (ctx -> flags & IORING_SETUP_SQPOLL ) {
8948- /* there is only one file note, which is owned by sqo_task */
8949- WARN_ON_ONCE (ctx -> sqo_task != current &&
8950- xa_load (& tctx -> xa , (unsigned long )file ));
8951- /* sqo_dead check is for when this happens after cancellation */
8952- WARN_ON_ONCE (ctx -> sqo_task == current && !ctx -> sqo_dead &&
8953- !xa_load (& tctx -> xa , (unsigned long )file ));
8954-
8955- io_disable_sqo_submit (ctx );
8956- }
8957-
8958- if (!(ctx -> flags & IORING_SETUP_SQPOLL ) || ctx -> sqo_task == current )
8959- io_uring_del_task_file (file );
8960- return 0 ;
8961- }
8962-
89638917static void * io_uring_validate_mmap_request (struct file * file ,
89648918 loff_t pgoff , size_t sz )
89658919{
@@ -9291,7 +9245,6 @@ static void io_uring_show_fdinfo(struct seq_file *m, struct file *f)
92919245
92929246static const struct file_operations io_uring_fops = {
92939247 .release = io_uring_release ,
9294- .flush = io_uring_flush ,
92959248 .mmap = io_uring_mmap ,
92969249#ifndef CONFIG_MMU
92979250 .get_unmapped_area = io_uring_nommu_get_unmapped_area ,
0 commit comments