diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2021-04-27 17:13:51 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-04-29 21:26:18 +0200 |
commit | 2840f710f23a3a867426637393acbdfa1f4f1d59 (patch) | |
tree | dcd97720293e78710c392ca71fd4b37b76c486fa /fs | |
parent | Merge tag 'x86-mm-2021-04-29' of git://git.kernel.org/pub/scm/linux/kernel/gi... (diff) | |
download | linux-2840f710f23a3a867426637393acbdfa1f4f1d59.tar.xz linux-2840f710f23a3a867426637393acbdfa1f4f1d59.zip |
io_uring: fix drain with rsrc CQEs
Resource emitted CQEs are not bound to requests, so fix up counters used
for DRAIN/defer logic.
Fixes: b60c8dce33895 ("io_uring: preparation for rsrc tagging")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/2b32f5f0a40d5928c3466d028f936e167f0654be.1619536280.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/io_uring.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c index 360f81395d81..b0706f047c50 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -7539,6 +7539,7 @@ static void __io_rsrc_put_work(struct io_rsrc_node *ref_node) io_ring_submit_lock(ctx, lock_ring); spin_lock_irqsave(&ctx->completion_lock, flags); io_cqring_fill_event(ctx, prsrc->tag, 0, 0); + ctx->cq_extra++; io_commit_cqring(ctx); spin_unlock_irqrestore(&ctx->completion_lock, flags); io_cqring_ev_posted(ctx); |