fsverity: optimize fsverity_file_open() on non-verity files

Make fsverity_file_open() an inline function that does the IS_VERITY()
check, then (if needed) calls __fsverity_file_open() to do the real
work.  This reduces the overhead on non-verity files.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Acked-by: Dave Chinner <dchinner@redhat.com>
Link: https://lore.kernel.org/r/20221214224304.145712-2-ebiggers@kernel.org
This commit is contained in:
Eric Biggers 2022-12-14 14:43:01 -08:00
commit a6528a960b
2 changed files with 25 additions and 21 deletions