Message ID | 20221123110614.3297343-3-dylany@meta.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | io_uring: batch multishot completions | expand |
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index e40d7b3404eb..0741a728fb6a 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -858,7 +858,10 @@ void io_req_complete_post(struct io_kiocb *req) inline void __io_req_complete(struct io_kiocb *req, unsigned issue_flags) { - io_req_complete_post(req); + if (issue_flags & IO_URING_F_COMPLETE_DEFER) + io_req_complete_defer(req); + else + io_req_complete_post(req); } void io_req_complete_failed(struct io_kiocb *req, s32 res)
For consistency always defer completion if specified in the issue flags. Signed-off-by: Dylan Yudaken <dylany@meta.com> --- io_uring/io_uring.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)