forked from luck/tmp_suning_uos_patched
fscrypt: don't check for ENOKEY from fscrypt_get_encryption_info()
fscrypt_get_encryption_info() returns 0 if the encryption key is unavailable; it never returns ENOKEY. So remove checks for ENOKEY. Link: https://lore.kernel.org/r/20191209212348.243331-1-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@google.com>
This commit is contained in:
parent
b7e8d3d27e
commit
3b1ada55b9
|
@ -120,7 +120,7 @@ static int ext4_readdir(struct file *file, struct dir_context *ctx)
|
|||
|
||||
if (IS_ENCRYPTED(inode)) {
|
||||
err = fscrypt_get_encryption_info(inode);
|
||||
if (err && err != -ENOKEY)
|
||||
if (err)
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
|
@ -987,7 +987,7 @@ static int f2fs_readdir(struct file *file, struct dir_context *ctx)
|
|||
|
||||
if (IS_ENCRYPTED(inode)) {
|
||||
err = fscrypt_get_encryption_info(inode);
|
||||
if (err && err != -ENOKEY)
|
||||
if (err)
|
||||
goto out;
|
||||
|
||||
err = fscrypt_fname_alloc_buffer(inode, F2FS_NAME_LEN, &fstr);
|
||||
|
|
|
@ -512,7 +512,7 @@ static int ubifs_readdir(struct file *file, struct dir_context *ctx)
|
|||
|
||||
if (encrypted) {
|
||||
err = fscrypt_get_encryption_info(dir);
|
||||
if (err && err != -ENOKEY)
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
err = fscrypt_fname_alloc_buffer(dir, UBIFS_MAX_NLEN, &fstr);
|
||||
|
|
Loading…
Reference in New Issue
Block a user