Re: [PATCH v8 03/22] ovl: use core fsverity ensure info interface
Eric Biggers <[email protected]> Tue, 21 Apr 2026 14:44:57 -0700
| 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-unionfs,org.kernel.vger.linux-xfs |
|---|---|
| Message-ID | <20260421214457.GC37143@quark> |
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