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)
8964
8964
fput (file );
8965
8965
}
8966
8966
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
-
8984
8967
static void io_uring_remove_task_files (struct io_uring_task * tctx )
8985
8968
{
8986
8969
struct file * file ;
@@ -9072,7 +9055,17 @@ void __io_uring_task_cancel(void)
9072
9055
9073
9056
static int io_uring_flush (struct file * file , void * data )
9074
9057
{
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
+
9076
9069
return 0 ;
9077
9070
}
9078
9071
You can’t perform that action at this time.
0 commit comments