fscrypt: split up fscrypt_supported_policy() by policy version
authorEric Biggers <ebiggers@google.com>
Mon, 9 Dec 2019 21:18:26 +0000 (13:18 -0800)
committerEric Biggers <ebiggers@google.com>
Tue, 31 Dec 2019 16:33:50 +0000 (10:33 -0600)
commit393a24a7956ce27d110b06bbd1674408ab8f6132
treed1aa18209555670f418eb13ae27a1b333f689dc9
parent56dce717950925f9d734b9e5621cbd41cbeb3e33
fscrypt: split up fscrypt_supported_policy() by policy version

Make fscrypt_supported_policy() call new functions
fscrypt_supported_v1_policy() and fscrypt_supported_v2_policy(), to
reduce the indentation level and make the code easier to read.

Also adjust the function comment to mention that whether the encryption
policy is supported can also depend on the inode.

No change in behavior.

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