File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -6750,6 +6750,10 @@ static int __io_sq_thread(struct io_ring_ctx *ctx, bool cap_entries)
6750
6750
if (!list_empty (& ctx -> iopoll_list ))
6751
6751
io_do_iopoll (ctx , & nr_events , 0 );
6752
6752
6753
+ /*
6754
+ * Don't submit if refs are dying, good for io_uring_register(),
6755
+ * but also it is relied upon by io_ring_exit_work()
6756
+ */
6753
6757
if (to_submit && likely (!percpu_ref_is_dying (& ctx -> refs )) &&
6754
6758
!(ctx -> flags & IORING_SETUP_R_DISABLED ))
6755
6759
ret = io_submit_sqes (ctx , to_submit );
@@ -8540,14 +8544,6 @@ static void io_ring_exit_work(struct work_struct *work)
8540
8544
struct io_tctx_node * node ;
8541
8545
int ret ;
8542
8546
8543
- /* prevent SQPOLL from submitting new requests */
8544
- if (ctx -> sq_data ) {
8545
- io_sq_thread_park (ctx -> sq_data );
8546
- list_del_init (& ctx -> sqd_list );
8547
- io_sqd_update_thread_idle (ctx -> sq_data );
8548
- io_sq_thread_unpark (ctx -> sq_data );
8549
- }
8550
-
8551
8547
/*
8552
8548
* If we're doing polled IO and end up having requests being
8553
8549
* submitted async (out-of-line), then completions can come in while
You can’t perform that action at this time.
0 commit comments