tmp_suning_uos_patched/fs/ext4
Eric Biggers 54475f531b fscrypt: use ENOKEY when file cannot be created w/o key
As part of an effort to clean up fscrypt-related error codes, make
attempting to create a file in an encrypted directory that hasn't been
"unlocked" fail with ENOKEY.  Previously, several error codes were used
for this case, including ENOENT, EACCES, and EPERM, and they were not
consistent between and within filesystems.  ENOKEY is a better choice
because it expresses that the failure is due to lacking the encryption
key.  It also matches the error code returned when trying to open an
encrypted regular file without the key.

I am not aware of any users who might be relying on the previous
inconsistent error codes, which were never documented anywhere.

This failure case will be exercised by an xfstest.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-12-31 16:26:20 -05:00
..
acl.c
acl.h
balloc.c
bitmap.c
block_validity.c
dir.c
ext4_extents.h
ext4_jbd2.c
ext4_jbd2.h
ext4.h
extents_status.c
extents_status.h
extents.c
file.c
fsync.c
hash.c
ialloc.c
indirect.c
inline.c
inode.c
ioctl.c
Kconfig
Makefile
mballoc.c
mballoc.h
migrate.c
mmp.c
move_extent.c
namei.c
page-io.c
readpage.c
resize.c
super.c
symlink.c
sysfs.c
truncate.h
xattr_security.c
xattr_trusted.c
xattr_user.c
xattr.c
xattr.h