Re: [PATCH v4 03/15] ext4: move fscrypt to filesystem inode

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

On Wed, Jul 23, 2025 at 12:57:41PM +0200, Christian Brauner wrote:
> ext4: move fscrypt to filesystem inode

ext4: move fscrypt_inode_info pointer to ext4_inode_info

Similarly in other patches. Calling the pointer the "fscrypt" (or the
"fsverity") is kind of an abuse of terminology.

> const struct fscrypt_operations ext4_cryptops = {
> +#ifdef CONFIG_FS_ENCRYPTION
> + .inode_info_offs = offsetof(struct ext4_inode_info, i_crypt_info) -
> + offsetof(struct ext4_inode_info, vfs_inode),
> +#endif
> .needs_bounce_pages = 1,
> .has_32bit_inodes = 1,
> .supports_subblock_data_units = 1,

No need for #ifdef CONFIG_FS_ENCRYPTION in this file, since it is
compiled only when CONFIG_FS_ENCRYPTION=y. Similarly in other patches.

- Eric