diff options
author | Jens Axboe <[email protected]> | 2019-10-09 14:40:13 -0600 |
---|---|---|
committer | Jens Axboe <[email protected]> | 2019-10-09 15:13:47 -0600 |
commit | 8a99734081775c012a4a6c442fdef0379fe52bdf (patch) | |
tree | 3e9ca80637271c130150c57dc958390b8fbb1255 | |
parent | 6805b32ec2b0897eb180295385efe306e5ac3b3d (diff) |
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: 6b06314c47e1 ("io_uring: add file set registration")
Reported-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
-rw-r--r-- | fs/io_uring.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c index ceb3497bdd2a..2c44648217bd 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -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); } |