io_uring: extra a helper for drain init
authorPavel Begunkov <asml.silence@gmail.com>
Fri, 1 Oct 2021 17:07:00 +0000 (18:07 +0100)
committerJens Axboe <axboe@kernel.dk>
Tue, 19 Oct 2021 11:49:54 +0000 (05:49 -0600)
commit22b2ca310afcea319c72e051df0371f668192b10
treee313a972a13c44af5b026551265bc8b72f26d36e
parent5e371265ea1d3e0cd02236b1a6d79fe322523ae8
io_uring: extra a helper for drain init

Add a helper io_init_req_drain for initialising requests with
IOSQE_DRAIN set. Also move bits from preambule of io_drain_req() in
there, because we already modify all the bits needed inside the helper.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/dcb412825b35b1cb8891245a387d7d69f8d14cef.1633107393.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c