KEYS: Merge the type-specific data with the payload data
[deliverable/linux.git] / fs / ext4 / crypto_key.c
index 1d510c11b100cf3eb8a1cdcafa9131a94e3841bb..5c52c79dea4625c4a73d7d6195da9c1e39d6f02b 100644 (file)
@@ -121,7 +121,7 @@ int _ext4_get_encryption_info(struct inode *inode)
        struct key *keyring_key = NULL;
        struct ext4_encryption_key *master_key;
        struct ext4_encryption_context ctx;
-       struct user_key_payload *ukp;
+       const struct user_key_payload *ukp;
        struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb);
        struct crypto_ablkcipher *ctfm;
        const char *cipher_str;
@@ -209,7 +209,7 @@ retry:
        }
        crypt_info->ci_keyring_key = keyring_key;
        BUG_ON(keyring_key->type != &key_type_logon);
-       ukp = ((struct user_key_payload *)keyring_key->payload.data);
+       ukp = user_key_payload(keyring_key);
        if (ukp->datalen != sizeof(struct ext4_encryption_key)) {
                res = -EINVAL;
                goto out;
This page took 0.043602 seconds and 5 git commands to generate.