File tree Expand file tree Collapse file tree 1 file changed +11
-18
lines changed Expand file tree Collapse file tree 1 file changed +11
-18
lines changed Original file line number Diff line number Diff line change @@ -8964,23 +8964,6 @@ static void io_uring_del_task_file(struct file *file)
89648964 fput (file );
89658965}
89668966
8967- /*
8968- * Drop task note for this file if we're the only ones that hold it after
8969- * pending fput()
8970- */
8971- static void io_uring_attempt_task_drop (struct file * file )
8972- {
8973- if (!current -> io_uring )
8974- return ;
8975- /*
8976- * fput() is pending, will be 2 if the only other ref is our potential
8977- * task file note. If the task is exiting, drop regardless of count.
8978- */
8979- if (fatal_signal_pending (current ) || (current -> flags & PF_EXITING ) ||
8980- atomic_long_read (& file -> f_count ) == 2 )
8981- io_uring_del_task_file (file );
8982- }
8983-
89848967static void io_uring_remove_task_files (struct io_uring_task * tctx )
89858968{
89868969 struct file * file ;
@@ -9072,7 +9055,17 @@ void __io_uring_task_cancel(void)
90729055
90739056static int io_uring_flush (struct file * file , void * data )
90749057{
9075- io_uring_attempt_task_drop (file );
9058+ if (!current -> io_uring )
9059+ return 0 ;
9060+
9061+ /*
9062+ * fput() is pending, will be 2 if the only other ref is our potential
9063+ * task file note. If the task is exiting, drop regardless of count.
9064+ */
9065+ if (fatal_signal_pending (current ) || (current -> flags & PF_EXITING ) ||
9066+ atomic_long_read (& file -> f_count ) == 2 )
9067+ io_uring_del_task_file (file );
9068+
90769069 return 0 ;
90779070}
90789071
You can’t perform that action at this time.
0 commit comments