File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -4392,19 +4392,20 @@ static void io_poll_remove_all(struct io_ring_ctx *ctx)
4392
4392
{
4393
4393
struct hlist_node * tmp ;
4394
4394
struct io_kiocb * req ;
4395
- int i ;
4395
+ int posted = 0 , i ;
4396
4396
4397
4397
spin_lock_irq (& ctx -> completion_lock );
4398
4398
for (i = 0 ; i < (1U << ctx -> cancel_hash_bits ); i ++ ) {
4399
4399
struct hlist_head * list ;
4400
4400
4401
4401
list = & ctx -> cancel_hash [i ];
4402
4402
hlist_for_each_entry_safe (req , tmp , list , hash_node )
4403
- io_poll_remove_one (req );
4403
+ posted += io_poll_remove_one (req );
4404
4404
}
4405
4405
spin_unlock_irq (& ctx -> completion_lock );
4406
4406
4407
- io_cqring_ev_posted (ctx );
4407
+ if (posted )
4408
+ io_cqring_ev_posted (ctx );
4408
4409
}
4409
4410
4410
4411
static int io_poll_cancel (struct io_ring_ctx * ctx , __u64 sqe_addr )
You can’t perform that action at this time.
0 commit comments