diff options
| author | Eric Biggers <ebiggers@google.com> | 2017-04-04 14:39:41 -0700 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2017-05-21 18:45:09 +0200 |
| commit | a675fbaca030d724d4d4271b30771b2faa019618 (patch) | |
| tree | 1d9f9979d85613149dfe0288e07f2179a16fca8a /fs/crypto/keyinfo.c | |
| parent | f6243676342f5a02713ff8215975b3d51c8e052d (diff) | |
fscrypt: remove unnecessary checks for NULL operations
The functions in fs/crypto/*.c are only called by filesystems configured
with encryption support. Since the ->get_context(), ->set_context(),
and ->empty_dir() operations are always provided in that case (and must
be, otherwise there would be no way to get/set encryption policies, or
in the case of ->get_context() even access encrypted files at all),
there is no need to check for these operations being NULL and we can
remove these unneeded checks.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/crypto/keyinfo.c')
| -rw-r--r-- | fs/crypto/keyinfo.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/crypto/keyinfo.c b/fs/crypto/keyinfo.c index 32f04690f..c0fd593b9 100644 --- a/fs/crypto/keyinfo.c +++ b/fs/crypto/keyinfo.c @@ -194,9 +194,6 @@ int fscrypt_get_encryption_info(struct inode *inode) if (res) return res; - if (!inode->i_sb->s_cop->get_context) - return -EOPNOTSUPP; - res = inode->i_sb->s_cop->get_context(inode, &ctx, sizeof(ctx)); if (res < 0) { if (!fscrypt_dummy_context_enabled(inode) || |
