Re: [PATCH v7 03/22] ovl: use core fsverity ensure info interface
Andrey Albershteyn <[email protected]> Tue, 14 Apr 2026 15:53:36 +0200
| Newsgroups | dev.linux.lists.fsverity,net.sourceforge.lists.linux-f2fs-devel,org.kernel.vger.linux-btrfs,org.kernel.vger.linux-ext4,org.kernel.vger.linux-fsdevel,org.kernel.vger.linux-xfs |
|---|---|
| Message-ID | <u3szxuhjrv7vyxwyrepuflwhzeucss7xj3cxj73mnpm5kal2da@jck24ig4oxxa> |
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