io_uring: pass in io_kiocb to fill/add CQ handlers
authorJens Axboe <axboe@kernel.dk>
Wed, 6 Nov 2019 22:21:34 +0000 (15:21 -0700)
committerJens Axboe <axboe@kernel.dk>
Fri, 8 Nov 2019 13:57:27 +0000 (06:57 -0700)
commit78e19bbef38362cebff38aa1ca12e2c82bb72eb8
tree87cf52a004c0210ecb3f42763c79213c5214ea16
parent84f97dc2333c626979bb547fce343a1003544dcc
io_uring: pass in io_kiocb to fill/add CQ handlers

This is in preparation for handling CQ ring overflow a bit smarter. We
should not have any functional changes in this patch. Most of the
changes are fairly straight forward, the only ones that stick out a bit
are the ones that change __io_free_req() to take the reference count
into account. If the request hasn't been submitted yet, we know it's
safe to simply ignore references and free it. But let's clean these up
too, as later patches will depend on the caller doing the right thing if
the completion logging grabs a reference to the request.

Reviewed-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c