fsverity: optimize fsverity_cleanup_inode() on non-verity files
authorEric Biggers <ebiggers@google.com>
Wed, 14 Dec 2022 22:43:03 +0000 (14:43 -0800)
committerEric Biggers <ebiggers@google.com>
Sun, 1 Jan 2023 23:46:48 +0000 (15:46 -0800)
commit9642946c6c851ba954689f184b3370e3594b6b1a
tree2ee4051f2fb36d041f2845bcd2427d3e3231e22e
parent01d90c07a592b532c7a673dfd8baa6d6e496273d
fsverity: optimize fsverity_cleanup_inode() on non-verity files

Make fsverity_cleanup_inode() an inline function that checks for
non-NULL ->i_verity_info, then (if needed) calls
__fsverity_cleanup_inode() 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-4-ebiggers@kernel.org
fs/verity/open.c
include/linux/fsverity.h