fsverity fix for v7.1-rc3

Fix a regression in overlayfs caused by an fsverity API change
 -----BEGIN PGP SIGNATURE-----
 
 iIoEABYIADIWIQSacvsUNc7UX4ntmEPzXCl4vpKOKwUCaf97zhQcZWJpZ2dlcnNA
 a2VybmVsLm9yZwAKCRDzXCl4vpKOK+PtAQDzevIJ21gYwhimSRxpbB/eDRQO3gD2
 wz4bz2lXZiCjIwEA8rktrlFgrLeqo1W252YXGpvlczf5qgupos3t4Hm8LAk=
 =WsMl
 -----END PGP SIGNATURE-----

Merge tag 'fsverity-for-linus' of git://git.kernel.org/pub/scm/fs/fsverity/linux

Pull fsverity fix from Eric Biggers:
 "Fix a regression in overlayfs caused by an fsverity API change"

* tag 'fsverity-for-linus' of git://git.kernel.org/pub/scm/fs/fsverity/linux:
  ovl: fix verity lazy-load guard broken by fsverity_active() semantic change
This commit is contained in:
Linus Torvalds 2026-05-09 11:47:39 -07:00
commit 1bfaee9d33

View File

@ -1354,7 +1354,7 @@ int ovl_ensure_verity_loaded(const struct path *datapath)
struct inode *inode = d_inode(datapath->dentry); struct inode *inode = d_inode(datapath->dentry);
struct file *filp; struct file *filp;
if (!fsverity_active(inode) && IS_VERITY(inode)) { if (IS_VERITY(inode) && fsverity_get_info(inode) == NULL) {
/* /*
* If this inode was not yet opened, the verity info hasn't been * 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. * loaded yet, so we need to do that here to force it into memory.