fsverity: optimize fsverity_file_open() on non-verity files
authorEric Biggers <ebiggers@google.com>
Wed, 14 Dec 2022 22:43:01 +0000 (14:43 -0800)
committerEric Biggers <ebiggers@google.com>
Sun, 1 Jan 2023 23:46:48 +0000 (15:46 -0800)
commita6528a960b78715d4c3d2c9cda85714b15a0faa4
tree3541aba216f638942ae2bca7667397efdb4a412a
parent88603b6dc419445847923fcb7fe5080067a30f98
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
fs/verity/open.c
include/linux/fsverity.h