Skip to content

Commit

Permalink
io_uring: only flush workqueues on fileset removal
Browse files Browse the repository at this point in the history
commit 8a99734 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Jens Axboe authored and Greg Kroah-Hartman committed Oct 17, 2019
1 parent 58cd9be commit 9392e3a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/io_uring.c
Original file line number Diff line number Diff line change
Expand Up @@ -2566,7 +2566,8 @@ static void io_destruct_skb(struct sk_buff *skb)
{
struct io_ring_ctx *ctx = skb->sk->sk_user_data;

io_finish_async(ctx);
if (ctx->sqo_wq)
flush_workqueue(ctx->sqo_wq);
unix_destruct_scm(skb);
}

Expand Down

0 comments on commit 9392e3a

Please sign in to comment.