From 097d7c1fcb8d4b52c62a36f94b8f18bc21a24934 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Tue, 7 Feb 2023 22:21:07 -0800 Subject: fscrypt: clean up fscrypt_add_test_dummy_key() Now that fscrypt_add_test_dummy_key() is only called by setup_file_encryption_key() and not by the individual filesystems, un-export it. Also change its prototype to take the fscrypt_key_specifier directly, as the caller already has it. Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20230208062107.199831-6-ebiggers@kernel.org --- fs/crypto/keysetup.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'fs/crypto/keysetup.c') diff --git a/fs/crypto/keysetup.c b/fs/crypto/keysetup.c index 20323c0ba4c5..aa94fba9d17e 100644 --- a/fs/crypto/keysetup.c +++ b/fs/crypto/keysetup.c @@ -464,9 +464,7 @@ static int setup_file_encryption_key(struct fscrypt_info *ci, */ if (dummy_policy && fscrypt_policies_equal(dummy_policy, &ci->ci_policy)) { - struct fscrypt_dummy_policy tmp = { dummy_policy }; - - err = fscrypt_add_test_dummy_key(sb, &tmp); + err = fscrypt_add_test_dummy_key(sb, &mk_spec); if (err) return err; mk = fscrypt_find_master_key(sb, &mk_spec); -- cgit v1.2.3-58-ga151