mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
KEYS: Permit key_serial() to be called with a const key pointer
Permit key_serial() to be called with a const key pointer. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: James Morris <jmorris@namei.org>
This commit is contained in:
committed by
James Morris
parent
f6b24579d0
commit
456a8167e9
@@ -271,7 +271,7 @@ extern int keyring_add_key(struct key *keyring,
|
||||
|
||||
extern struct key *key_lookup(key_serial_t id);
|
||||
|
||||
static inline key_serial_t key_serial(struct key *key)
|
||||
static inline key_serial_t key_serial(const struct key *key)
|
||||
{
|
||||
return key ? key->serial : 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user