mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
fsverity fix for v7.2-rc7
Fix a regression where truncating a file with fsverity enabled started being allowed on kernels without fsverity support. -----BEGIN PGP SIGNATURE----- iIoEABYIADIWIQSacvsUNc7UX4ntmEPzXCl4vpKOKwUCanDeAhQcZWJpZ2dlcnNA a2VybmVsLm9yZwAKCRDzXCl4vpKOKyYTAQCTfYq9OAJPt0ehUHTPpQeYESZAKRjo xxpirrJdHkhpgwEAlLXBLRHtlE43p/5wb6EzTk3ra31Kg5bKzjzDFtDz5QQ= =jMbW -----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 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:
commit
848acc8ffe
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user