OSDN Git Service

io_uring: optimise hot path restricted checks
authorPavel Begunkov <asml.silence@gmail.com>
Sat, 26 Jun 2021 20:40:47 +0000 (21:40 +0100)
committerJens Axboe <axboe@kernel.dk>
Wed, 30 Jun 2021 20:15:40 +0000 (14:15 -0600)
commit4cfb25bf8877c947e5ae4875e387babe87e12afa
tree4ccc1d88717996ae8c74f02c706e9afe6451b809
parente5dc480d4ed9884274e95c757fa2d2e9cc1047ee
io_uring: optimise hot path restricted checks

Move likely/unlikely from io_check_restriction() to specifically
ctx->restricted check, because doesn't do what it supposed to and make
the common path take an extra jump.

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