From e7cb7e5af7ac0d3f46a8121f8ce73b05811c1990 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Mon, 8 May 2017 10:21:34 -0700 Subject: [PATCH] Revert "ext4: require encryption feature for EXT4_IOC_SET_ENCRYPTION_POLICY" This reverts commit e2968fb8e7980dccc199dac2593ad476db20969f. For various reasons, we've had to start enforcing upstream that ext4 encryption can only be used if the filesystem superblock has the EXT4_FEATURE_INCOMPAT_ENCRYPT flag set, as was the intended design. Unfortunately, Android isn't ready for this quite yet, since its userspace still needs to be updated to set the flag at mkfs time, or else fix it later with tune2fs. It will need some more time to be fixed properly, so for now to avoid breaking some devices, revert the kernel change. Bug: 36231741 Signed-off-by: Eric Biggers Change-Id: I30bd54afb68dbaf9801f8954099dffa90a2f8df1 --- fs/ext4/ioctl.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c index c21826be1cb3..3a2594665b44 100644 --- a/fs/ext4/ioctl.c +++ b/fs/ext4/ioctl.c @@ -626,9 +626,6 @@ resizefs_out: struct ext4_encryption_policy policy; int err = 0; - if (!ext4_has_feature_encrypt(sb)) - return -EOPNOTSUPP; - if (copy_from_user(&policy, (struct ext4_encryption_policy __user *)arg, sizeof(policy))) { -- 2.34.1