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

Eric Biggers <[email protected]>
Newsgroups org.kernel.vger.linux-unionfs,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 <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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.