Unverified Commit 8a3d00dd authored by Eric Biggers's avatar Eric Biggers Committed by Christian Brauner
Browse files

fsverity: check IS_VERITY() in fsverity_cleanup_inode()



Since getting the address of the fsverity_info has gotten a bit more
expensive, make fsverity_cleanup_inode() check for IS_VERITY() instead.
This avoids adding more overhead to non-verity files.

This assumes that verity info is never set when !IS_VERITY(), which is
currently true, but add a VFS_WARN_ON_ONCE() that asserts that.  (This
of course defeats the optimization, but only when CONFIG_VFS_DEBUG=y.)

Signed-off-by: default avatarEric Biggers <ebiggers@kernel.org>
Link: https://lore.kernel.org/20250810075706.172910-14-ebiggers@kernel.org


Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent 818c659a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment