summaryrefslogtreecommitdiff
path: root/scripts/basic/split-include.c
diff options
context:
space:
mode:
authorAlberto Garcia <berto@igalia.com>2026-09-25 16:19:18 +0200
committerEric Biggers <ebiggers@kernel.org>2026-10-24 12:58:37 -0700
commit0e341d1d29db11c29211d2b8870a515c26589d5a (patch)
tree5b21150785d54943899f72615f89c21f4ddb6186 /scripts/basic/split-include.c
parentcf66375465b9ca531f5c294f468db1df293c178c (diff)
downloadlinux-next-0e341d1d29db11c29211d2b8870a515c26589d5a.tar.gz
linux-next-0e341d1d29db11c29211d2b8870a515c26589d5a.zip
ext4: refuse encryption when block size > page size
Encryption is not supported when a filesystem's block size is larger than the page size, and commit 709f0f1f1bf5 ("ext4: add checks for large folio incompatibilities when BS > PS") added a check to refuse mounting such a filesystem. However, it is also possible to enable the "encrypt" feature on a filesystem that is already mounted (with tune2fs -O encrypt). Once that happens it won't be possible to mount the filesystem again in the future, but there is nothing preventing the user from setting an encryption policy while the filesystem is still mounted. Fix this by refusing to set an fscrypt context in ext4_set_context() when the block size is larger than the page size. Fixes: 709f0f1f1bf5 ("ext4: add checks for large folio incompatibilities when BS > PS") Cc: stable@vger.kernel.org # v6.19+ Signed-off-by: Alberto Garcia <berto@igalia.com> Reviewed-by: Baokun Li <libaokun@linux.alibaba.com> Reviewed-by: Eric Biggers <ebiggers@kernel.org> Link: https://patch.msgid.link/093b40e9df29fc102907092f4ff73461f4cfcbfd.1790343958.git.berto@igalia.com Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Diffstat (limited to 'scripts/basic/split-include.c')
0 files changed, 0 insertions, 0 deletions