]> git.ipfire.org Git - thirdparty/linux.git/commit - fs/io_uring.c
io_uring: keep all sqe->flags in req->flags
authorPavel Begunkov <asml.silence@gmail.com>
Sat, 11 Apr 2020 23:05:04 +0000 (02:05 +0300)
committerJens Axboe <axboe@kernel.dk>
Sun, 12 Apr 2020 14:46:49 +0000 (08:46 -0600)
commitdea3b49c7fb09b4f6b6a574c0485ffeb9df7b69c
treea4b322afdb48024a49488237ede17e24d880737a
parent1d4240cc9e7bb101dac58f30283fa24a809f5606
io_uring: keep all sqe->flags in req->flags

It's a good idea to not read sqe->flags twice, as it's prone to security
bugs. Instead of passing it around, embeed them in req->flags. It's
already so except for IOSQE_IO_LINK.
1. rename former REQ_F_LINK -> REQ_F_LINK_HEAD
2. introduce and copy REQ_F_LINK, which mimics IO_IOSQE_LINK

And leave req_set_fail_links() using new REQ_F_LINK, because it's more
sensible.

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