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

Andrey Albershteyn
2026-04-14T13:53:42Z

On 2026-04-14 10:13:01, Christoph Hellwig wrote:
> On Thu, Apr 09, 2026 at 03:13:35PM +0200, Andrey Albershteyn wrote:
> > - 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))
> > + fsverity_ensure_verity_info(inode);
>
> fsverity_ensure_verity_info already is a no-op for !fsverity_active,
> so the check could be remove.

I don't think it is. For non-fsverity inodes it will try to call into
descriptor reading callback and fail.

> Also we should probably propagate the
> error return from fsverity_ensure_verity_info here.

oh right, thanks!

--
- Andrey