projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8d4af68
)
io_uring: mark having different creds unlikely
author
Pavel Begunkov
<asml.silence@gmail.com>
Fri, 24 Sep 2021 20:59:41 +0000
(21:59 +0100)
committer
Jens Axboe
<axboe@kernel.dk>
Tue, 19 Oct 2021 11:49:53 +0000
(
05:49
-0600)
Hint the compiler that it's not as likely to have creds different from
current attached to a request. The current code generation is far from
ideal, hopefully it can help to some compilers to remove duplicated jump
tables and so.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link:
https://lore.kernel.org/r/e7815251ac4bf5a4a23d298c752f029ae19f3837.1632516769.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c
patch
|
blob
|
history
diff --git
a/fs/io_uring.c
b/fs/io_uring.c
index 3ced6a7bdf2b5245bd8aa86153756b555eb19ee3..bda302bedeeff5e06137013201bc609466fb4941 100644
(file)
--- a/
fs/io_uring.c
+++ b/
fs/io_uring.c
@@
-6638,7
+6638,7
@@
static int io_issue_sqe(struct io_kiocb *req, unsigned int issue_flags)
const struct cred *creds = NULL;
int ret;
- if (
(req->flags & REQ_F_CREDS) && req->creds != current_cred(
))
+ if (
unlikely((req->flags & REQ_F_CREDS) && req->creds != current_cred()
))
creds = override_creds(req->creds);
switch (req->opcode) {