]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commita7b0ecb85c6fb31395165a47db8fc29789baa5f7
treea4b322afdb48024a49488237ede17e24d880737a
parent5e2a1a7cff043f25709341eff6cdea472e873e87
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