fscrypt: remove unnecessary checks for NULL operations
authorEric Biggers <ebiggers@google.com>
Tue, 4 Apr 2017 21:39:41 +0000 (14:39 -0700)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 30 Apr 2017 05:26:34 +0000 (01:26 -0400)
commitcd39e4bac11125bc32ba6101b1ceb46ef773f4b6
tree11f17b3e501c7bf09dee2fcc06ea38751e7fa7f3
parent39da7c509acff13fc8cb12ec1bb20337c988ed36
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>
fs/crypto/keyinfo.c
fs/crypto/policy.c