diff options
author | David Howells <dhowells@redhat.com> | 2015-10-21 09:04:48 -0400 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2015-10-21 10:18:36 -0400 |
commit | 146aa8b1453bd8f1ff2304ffb71b4ee0eb9acdcc (patch) | |
tree | a89ef2cd2e8029b0c09a58739cca0e7e2e68f4db /fs/ext4/crypto_key.c | |
parent | 4adc605edc5f744dcf432241b5996ff6a13d868c (diff) |
KEYS: Merge the type-specific data with the payload data
Merge the type-specific data with the payload data into one four-word chunk
as it seems pointless to keep them separate.
Use user_key_payload() for accessing the payloads of overloaded
user-defined keys.
Signed-off-by: David Howells <dhowells@redhat.com>
cc: linux-cifs@vger.kernel.org
cc: ecryptfs@vger.kernel.org
cc: linux-ext4@vger.kernel.org
cc: linux-f2fs-devel@lists.sourceforge.net
cc: linux-nfs@vger.kernel.org
cc: ceph-devel@vger.kernel.org
cc: linux-ima-devel@lists.sourceforge.net
Diffstat (limited to 'fs/ext4/crypto_key.c')
-rw-r--r-- | fs/ext4/crypto_key.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ext4/crypto_key.c b/fs/ext4/crypto_key.c index 1d510c11b100..5c52c79dea46 100644 --- a/fs/ext4/crypto_key.c +++ b/fs/ext4/crypto_key.c | |||
@@ -121,7 +121,7 @@ int _ext4_get_encryption_info(struct inode *inode) | |||
121 | struct key *keyring_key = NULL; | 121 | struct key *keyring_key = NULL; |
122 | struct ext4_encryption_key *master_key; | 122 | struct ext4_encryption_key *master_key; |
123 | struct ext4_encryption_context ctx; | 123 | struct ext4_encryption_context ctx; |
124 | struct user_key_payload *ukp; | 124 | const struct user_key_payload *ukp; |
125 | struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); | 125 | struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); |
126 | struct crypto_ablkcipher *ctfm; | 126 | struct crypto_ablkcipher *ctfm; |
127 | const char *cipher_str; | 127 | const char *cipher_str; |
@@ -209,7 +209,7 @@ retry: | |||
209 | } | 209 | } |
210 | crypt_info->ci_keyring_key = keyring_key; | 210 | crypt_info->ci_keyring_key = keyring_key; |
211 | BUG_ON(keyring_key->type != &key_type_logon); | 211 | BUG_ON(keyring_key->type != &key_type_logon); |
212 | ukp = ((struct user_key_payload *)keyring_key->payload.data); | 212 | ukp = user_key_payload(keyring_key); |
213 | if (ukp->datalen != sizeof(struct ext4_encryption_key)) { | 213 | if (ukp->datalen != sizeof(struct ext4_encryption_key)) { |
214 | res = -EINVAL; | 214 | res = -EINVAL; |
215 | goto out; | 215 | goto out; |