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

Pull fsverity fix from Eric Biggers:
 "Fix a regression where truncating a file with fsverity enabled started
  being allowed on kernels without fsverity support"

* tag 'fsverity-for-linus' of git://git.kernel.org/pub/scm/fs/fsverity/linux:
  fs,fsverity: remove check for fsverity being enabled in setattr_prepare()
This commit is contained in:
Linus Torvalds
2026-08-03 12:26:51 -07:00

View File

@@ -176,7 +176,7 @@ int setattr_prepare(struct mnt_idmap *idmap, struct dentry *dentry,
* covered by the open-time check because sys_truncate() takes a
* path, not an open file.
*/
if (IS_ENABLED(CONFIG_FS_VERITY) && IS_VERITY(inode))
if (IS_VERITY(inode))
return -EPERM;
error = inode_newsize_ok(inode, attr->ia_size);