Re: [PATCH v8 03/22] ovl: use core fsverity ensure info interface

Eric Biggers
2026-04-21T21:45:00Z

On Mon, Apr 20, 2026 at 01:46:50PM +0200, Andrey Albershteyn wrote:
> int ovl_ensure_verity_loaded(const struct path *datapath)
> {
> struct inode *inode = d_inode(datapath->dentry);
> - struct file *filp;
>
> - if (!fsverity_active(inode) && IS_VERITY(inode)) {
> - /*
> - * If this inode was not yet opened, the verity info hasn't been
> - * loaded yet, so we need to do that here to force it into memory.
> - */
> - filp = kernel_file_open(datapath, O_RDONLY, current_cred());
> - if (IS_ERR(filp))
> - return PTR_ERR(filp);
> - fput(filp);
> - }
> + if (fsverity_active(inode))
> + return fsverity_ensure_verity_info(inode);

Not sure whether I should review this version or the version in git, but
both seem wrong. The 'if (!fsverity_active(inode) && IS_VERITY(inode))
{' condition should stay, but fsverity_ensure_verity_info() will need to
gain a !CONFIG_FS_VERITY stub to fix the build error.

- Eric