summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-08-03 12:26:51 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2026-08-03 12:26:51 -0700
commit848acc8ffe1b7cd5f1bf427b93069becfebc2c9d (patch)
tree9d89b1191e1a7c521ce36526efa05d2334dc4f90
parent2e718c88315af1c0a04fd9c295d605944a7949af (diff)
parentd2f96bcb89d36d488a10e3bcf819b98536968286 (diff)
Merge tag 'fsverity-for-linus' of git://git.kernel.org/pub/scm/fs/fsverity/linuxHEADmaster
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()
-rw-r--r--fs/attr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/attr.c b/fs/attr.c
index 4f437fabb7f0..71888ac903c2 100644
--- a/fs/attr.c
+++ b/fs/attr.c
@@ -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);