summaryrefslogtreecommitdiffstats
path: root/fs/namei.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-07-25 19:55:52 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2011-07-25 19:55:52 -0700
commit14067ff536286bd2f7f79d46337d2228b12ef880 (patch)
tree74028825cc4562caf4c12cd96aebdce96aa6092c /fs/namei.c
parent750e06992d49666a7589aac555eb3bb68e4dbb88 (diff)
downloadtalos-obmc-linux-14067ff536286bd2f7f79d46337d2228b12ef880.tar.gz
talos-obmc-linux-14067ff536286bd2f7f79d46337d2228b12ef880.zip
vfs: make gcc generate more obvious code for acl permission checking
The "fsuid is the inode owner" case is not necessarily always the likely case, but it's the case that doesn't do anything odd and that we want in straight-line code. Make gcc not generate random "jump around for the fun of it" code. This just helps me read profiles. That thing is one of the hottest parts of the whole pathname lookup. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/namei.c')
-rw-r--r--fs/namei.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/namei.c b/fs/namei.c
index ec2e5656b444..ef00b984fb20 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -235,7 +235,7 @@ static int acl_permission_check(struct inode *inode, int mask)
if (current_user_ns() != inode_userns(inode))
goto other_perms;
- if (current_fsuid() == inode->i_uid)
+ if (likely(current_fsuid() == inode->i_uid))
mode >>= 6;
else {
if (IS_POSIXACL(inode) && (mode & S_IRWXG)) {
OpenPOWER on IntegriCloud