summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2021-02-12 19:41:16 +0100
committerJens Axboe <axboe@kernel.dk>2021-02-12 19:49:49 +0100
commitcdbff98223330cdb6c57ead1533ce066dddd61b7 (patch)
tree4b5a1e81d4c10cb139c9c452dc802b0086907997 /fs
parentio_uring: don't check PF_EXITING from syscall (diff)
downloadlinux-cdbff98223330cdb6c57ead1533ce066dddd61b7.tar.xz
linux-cdbff98223330cdb6c57ead1533ce066dddd61b7.zip
io_uring: clean io_req_find_next() fast check
Indirectly io_req_find_next() is called for every request, optimise the check by testing flags as it was long before -- __io_req_find_next() tolerates false-positives well (i.e. link==NULL), and those should be really rare. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs')
-rw-r--r--fs/io_uring.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 66bbb0dc50af..776531f6e18b 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -2172,7 +2172,7 @@ static struct io_kiocb *__io_req_find_next(struct io_kiocb *req)
static inline struct io_kiocb *io_req_find_next(struct io_kiocb *req)
{
- if (likely(!(req->link) && !(req->flags & REQ_F_LINK_TIMEOUT)))
+ if (likely(!(req->flags & (REQ_F_LINK|REQ_F_HARDLINK))))
return NULL;
return __io_req_find_next(req);
}