Re: [PATCH] generic/395: remove workarounds for wrong error codes

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



On Fri, Oct 30, 2020 at 10:40:18PM -0700, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@xxxxxxxxxx>
> 
> generic/395 contains workarounds to allow for some of the fscrypt ioctls
> to fail with different error codes.  However, the error codes were all
> fixed up and documented years ago:
> 
> - FS_IOC_GET_ENCRYPTION_POLICY on ext4 failed with ENOENT instead of
>   ENODATA on unencrypted files.  Fixed by commit db717d8e26c2
>   ("fscrypto: move ioctl processing more fully into common code").
> 
> - FS_IOC_SET_ENCRYPTION_POLICY failed with EINVAL instead of EEXIST
>   on encrypted files.  Fixed by commit 8488cd96ff88 ("fscrypt: use
>   EEXIST when file already uses different policy").
> 
> - FS_IOC_SET_ENCRYPTION_POLICY failed with EINVAL instead of ENOTDIR
>   on nondirectories.  Fixed by commit dffd0cfa06d4 ("fscrypt: use
>   ENOTDIR when setting encryption policy on nondirectory").
> 
> It's been long enough, so update the test to expect the correct behavior
> only, so we don't accidentally reintroduce the wrong behavior.
> 
> Signed-off-by: Eric Biggers <ebiggers@xxxxxxxxxx>

LGTM

Did these fixes get backported into the stable kernels (and the
relevant Android trees)?

						- Ted



[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux