Skip to content

Commit

Permalink
io_uring: only flush workqueues on fileset removal
Browse files Browse the repository at this point in the history
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: stable@vger.kernel.org
Fixes: 6b06314 ("io_uring: add file set registration")
Reported-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Jens Axboe committed Oct 9, 2019
1 parent 6805b32 commit 8a99734
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion fs/io_uring.c
Original file line number Diff line number Diff line change
Expand Up @@ -2866,8 +2866,12 @@ static void io_finish_async(struct io_ring_ctx *ctx)
static void io_destruct_skb(struct sk_buff *skb)
{
struct io_ring_ctx *ctx = skb->sk->sk_user_data;
int i;

for (i = 0; i < ARRAY_SIZE(ctx->sqo_wq); i++)
if (ctx->sqo_wq[i])
flush_workqueue(ctx->sqo_wq[i]);

io_finish_async(ctx);
unix_destruct_scm(skb);
}

Expand Down

0 comments on commit 8a99734

Please sign in to comment.