KEYS: Merge the type-specific data with the payload data
[deliverable/linux.git] / fs / ecryptfs / ecryptfs_kernel.h
index 5ba029e627cc22db0648317a619685e545977316..7b39260c7bbaa18fda583426a101a95124639dc5 100644 (file)
@@ -86,7 +86,7 @@ ecryptfs_get_encrypted_key_payload_data(struct key *key)
 {
        if (key->type == &key_type_encrypted)
                return (struct ecryptfs_auth_tok *)
-                       (&((struct encrypted_key_payload *)key->payload.data)->payload_data);
+                       (&((struct encrypted_key_payload *)key->payload.data[0])->payload_data);
        else
                return NULL;
 }
@@ -117,8 +117,7 @@ ecryptfs_get_key_payload_data(struct key *key)
 
        auth_tok = ecryptfs_get_encrypted_key_payload_data(key);
        if (!auth_tok)
-               return (struct ecryptfs_auth_tok *)
-                       (((struct user_key_payload *)key->payload.data)->data);
+               return (struct ecryptfs_auth_tok *)user_key_payload(key)->data;
        else
                return auth_tok;
 }
This page took 0.029185 seconds and 5 git commands to generate.