fscrypt: move fscrypt_valid_enc_modes() to policy.c
authorEric Biggers <ebiggers@google.com>
Mon, 9 Dec 2019 21:18:28 +0000 (13:18 -0800)
committerEric Biggers <ebiggers@google.com>
Tue, 31 Dec 2019 16:33:50 +0000 (10:33 -0600)
commitef5b18b00bada6091fb531fb0c29cf0f7e1a3b85
tree370289bf31f979d903f89f9d0e9a3a380c7d4a51
parent85af90e57ce9697d36d479124e0bfffb145e39a4
fscrypt: move fscrypt_valid_enc_modes() to policy.c

fscrypt_valid_enc_modes() is only used by policy.c, so move it to there.

Also adjust the order of the checks to be more natural, matching the
numerical order of the constants and also keeping AES-256 (the
recommended default) first in the list.

No change in behavior.

Link: https://lore.kernel.org/r/20191209211829.239800-4-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@google.com>
fs/crypto/fscrypt_private.h
fs/crypto/policy.c