Skip to content

Commit 8a99734

Browse files
committed
io_uring: only flush workqueues on fileset removal
We should not remove the workqueue, we just need to ensure that the workqueues are synced. The workqueues are torn down on ctx removal. Cc: [email protected] Fixes: 6b06314 ("io_uring: add file set registration") Reported-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 6805b32 commit 8a99734

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

fs/io_uring.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2866,8 +2866,12 @@ static void io_finish_async(struct io_ring_ctx *ctx)
28662866
static void io_destruct_skb(struct sk_buff *skb)
28672867
{
28682868
struct io_ring_ctx *ctx = skb->sk->sk_user_data;
2869+
int i;
2870+
2871+
for (i = 0; i < ARRAY_SIZE(ctx->sqo_wq); i++)
2872+
if (ctx->sqo_wq[i])
2873+
flush_workqueue(ctx->sqo_wq[i]);
28692874

2870-
io_finish_async(ctx);
28712875
unix_destruct_scm(skb);
28722876
}
28732877

0 commit comments

Comments
 (0)