Re: [PATCH v4 14/15] fs: drop i_verity_info from struct inode

Eric Biggers
2025-07-25T00:44:19Z

On Wed, Jul 23, 2025 at 12:57:52PM +0200, Christian Brauner wrote:
> static inline struct fsverity_info *fsverity_get_info(const struct inode *inode)
> {
> - if (!inode->i_sb->s_vop)
> + /*
> + * We're called from fsverity_active() which might be called on
> + * inodes from filesystems that don't support fsverity at all.
> + */
> + if (likely(!inode->i_sb->s_vop))
> return NULL;

!IS_VERITY().

Also the proposed comment is misleading, since fsverity_get_digest() and
bpf_get_fsverity_digest() similarly can call this on arbitrary inodes.

- Eric