File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -6868,7 +6868,6 @@ static bool io_sqd_handle_event(struct io_sq_data *sqd)
6868
6868
cond_resched ();
6869
6869
mutex_lock (& sqd -> lock );
6870
6870
}
6871
- io_run_task_work ();
6872
6871
return did_sig || test_bit (IO_SQ_THREAD_SHOULD_STOP , & sqd -> state );
6873
6872
}
6874
6873
@@ -6897,7 +6896,6 @@ static int io_sq_thread(void *data)
6897
6896
if (io_sqd_handle_event (sqd ))
6898
6897
break ;
6899
6898
timeout = jiffies + sqd -> sq_thread_idle ;
6900
- continue ;
6901
6899
}
6902
6900
6903
6901
cap_entries = !list_is_singular (& sqd -> ctx_list );
@@ -6907,17 +6905,18 @@ static int io_sq_thread(void *data)
6907
6905
if (!sqt_spin && (ret > 0 || !list_empty (& ctx -> iopoll_list )))
6908
6906
sqt_spin = true;
6909
6907
}
6908
+ if (io_run_task_work ())
6909
+ sqt_spin = true;
6910
6910
6911
6911
if (sqt_spin || !time_after (jiffies , timeout )) {
6912
- io_run_task_work ();
6913
6912
cond_resched ();
6914
6913
if (sqt_spin )
6915
6914
timeout = jiffies + sqd -> sq_thread_idle ;
6916
6915
continue ;
6917
6916
}
6918
6917
6919
6918
prepare_to_wait (& sqd -> wait , & wait , TASK_INTERRUPTIBLE );
6920
- if (!io_sqd_events_pending (sqd ) && !io_run_task_work () ) {
6919
+ if (!io_sqd_events_pending (sqd ) && !current -> task_works ) {
6921
6920
bool needs_sched = true;
6922
6921
6923
6922
list_for_each_entry (ctx , & sqd -> ctx_list , sqd_list ) {
You can’t perform that action at this time.
0 commit comments