diff options
author | Eric Biggers <ebiggers@google.com> | 2019-12-09 13:23:48 -0800 |
---|---|---|
committer | Eric Biggers <ebiggers@google.com> | 2019-12-31 10:33:51 -0600 |
commit | 3b1ada55b905f306411f481df52b586cc8a407b8 (patch) | |
tree | 0094f32a9629ba5745aa68482804887466f48981 /fs | |
parent | b7e8d3d27edde7a05e195e0015bc6873f6263a30 (diff) |
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ext4/dir.c | 2 | ||||
-rw-r--r-- | fs/f2fs/dir.c | 2 | ||||
-rw-r--r-- | fs/ubifs/dir.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/fs/ext4/dir.c b/fs/ext4/dir.c index 9f00fc0bf21d..4e093277c8bf 100644 --- a/fs/ext4/dir.c +++ b/fs/ext4/dir.c @@ -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; } diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c index c967cacf979e..d9ad842945df 100644 --- a/fs/f2fs/dir.c +++ b/fs/f2fs/dir.c @@ -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); diff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c index 0b98e3c8b461..acc4f942d25b 100644 --- a/fs/ubifs/dir.c +++ b/fs/ubifs/dir.c @@ -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); |