projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
26578cd
)
io_uring: flush completions for fallbacks
author
Pavel Begunkov
<asml.silence@gmail.com>
Wed, 18 Aug 2021 11:42:45 +0000
(12:42 +0100)
committer
Jens Axboe
<axboe@kernel.dk>
Mon, 23 Aug 2021 19:13:04 +0000
(13:13 -0600)
io_fallback_req_func() doesn't expect anyone creating inline
completions, and no one currently does that. Teach the function to flush
completions preparing for further changes.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link:
https://lore.kernel.org/r/8b941516921f72e1a64d58932d671736892d7fff.1629286357.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c
patch
|
blob
|
history
diff --git
a/fs/io_uring.c
b/fs/io_uring.c
index 3898f7ab14f6bc3e45f49203a32ce3420648306c..926df5b00b31671c48d0fdb2d777524ab9a49e03 100644
(file)
--- a/
fs/io_uring.c
+++ b/
fs/io_uring.c
@@
-1197,6
+1197,11
@@
static void io_fallback_req_func(struct work_struct *work)
percpu_ref_get(&ctx->refs);
llist_for_each_entry_safe(req, tmp, node, io_task_work.fallback_node)
req->io_task_work.func(req);
+
+ mutex_lock(&ctx->uring_lock);
+ if (ctx->submit_state.compl_nr)
+ io_submit_flush_completions(ctx);
+ mutex_unlock(&ctx->uring_lock);
percpu_ref_put(&ctx->refs);
}