summaryrefslogtreecommitdiffstats
path: root/fs/ecryptfs
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2015-10-21 09:04:48 -0400
committerDavid Howells <dhowells@redhat.com>2015-10-21 10:18:36 -0400
commit146aa8b1453bd8f1ff2304ffb71b4ee0eb9acdcc (patch)
treea89ef2cd2e8029b0c09a58739cca0e7e2e68f4db /fs/ecryptfs
parent4adc605edc5f744dcf432241b5996ff6a13d868c (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/ecryptfs')
-rw-r--r--fs/ecryptfs/ecryptfs_kernel.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/ecryptfs/ecryptfs_kernel.h b/fs/ecryptfs/ecryptfs_kernel.h
index 5ba029e627cc..7b39260c7bba 100644
--- a/fs/ecryptfs/ecryptfs_kernel.h
+++ b/fs/ecryptfs/ecryptfs_kernel.h
@@ -86,7 +86,7 @@ ecryptfs_get_encrypted_key_payload_data(struct key *key)
86{ 86{
87 if (key->type == &key_type_encrypted) 87 if (key->type == &key_type_encrypted)
88 return (struct ecryptfs_auth_tok *) 88 return (struct ecryptfs_auth_tok *)
89 (&((struct encrypted_key_payload *)key->payload.data)->payload_data); 89 (&((struct encrypted_key_payload *)key->payload.data[0])->payload_data);
90 else 90 else
91 return NULL; 91 return NULL;
92} 92}
@@ -117,8 +117,7 @@ ecryptfs_get_key_payload_data(struct key *key)
117 117
118 auth_tok = ecryptfs_get_encrypted_key_payload_data(key); 118 auth_tok = ecryptfs_get_encrypted_key_payload_data(key);
119 if (!auth_tok) 119 if (!auth_tok)
120 return (struct ecryptfs_auth_tok *) 120 return (struct ecryptfs_auth_tok *)user_key_payload(key)->data;
121 (((struct user_key_payload *)key->payload.data)->data);
122 else 121 else
123 return auth_tok; 122 return auth_tok;
124} 123}