OSDN Git Service

io_uring: provide generic io_req_complete() helper
authorJens Axboe <axboe@kernel.dk>
Mon, 22 Jun 2020 15:17:17 +0000 (09:17 -0600)
committerJens Axboe <axboe@kernel.dk>
Thu, 25 Jun 2020 13:22:41 +0000 (07:22 -0600)
commite1e16097e265daac918ce355bf1a0d1677adf0c7
tree021ae31525ecdfa8e33bd3132b4ad69f2974e213
parentd3cac64c498c4fb2df46b97ee6f4c7d6d75f5e3d
io_uring: provide generic io_req_complete() helper

We have lots of callers of:

io_cqring_add_event(req, result);
io_put_req(req);

Provide a helper that does this for us. It helps clean up the code, and
also provides a more convenient location for us to change the completion
handling.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c