selinux: Inode label revalidation performance fix
authorAndreas Gruenbacher <agruenba@redhat.com>
Tue, 5 Jan 2016 22:12:33 +0000 (23:12 +0100)
committerPaul Moore <paul@paul-moore.com>
Fri, 8 Jan 2016 21:24:27 +0000 (16:24 -0500)
commitb197367ed1ba81b0d26f7e7f76f61731ac6e5842
treeefc5fa3e91a36fd1e4de2aecdc37a697e7867a4d
parent76319946f321e30872dd72af7de867cb26e7a373
selinux: Inode label revalidation performance fix

Commit 5d226df4 has introduced a performance regression of about
10% in the UnixBench pipe benchmark.  It turns out that the call
to inode_security in selinux_file_permission can be moved below
the zero-mask test and that inode_security_revalidate can be
removed entirely, which brings us back to roughly the original
performance.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/selinux/hooks.c