diff options
Diffstat (limited to 'include/linux/key.h')
-rw-r--r-- | include/linux/key.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/key.h b/include/linux/key.h index 183a6af7715d..5253471cd2ea 100644 --- a/include/linux/key.h +++ b/include/linux/key.h | |||
@@ -271,7 +271,7 @@ extern int keyring_add_key(struct key *keyring, | |||
271 | 271 | ||
272 | extern struct key *key_lookup(key_serial_t id); | 272 | extern struct key *key_lookup(key_serial_t id); |
273 | 273 | ||
274 | static inline key_serial_t key_serial(struct key *key) | 274 | static inline key_serial_t key_serial(const struct key *key) |
275 | { | 275 | { |
276 | return key ? key->serial : 0; | 276 | return key ? key->serial : 0; |
277 | } | 277 | } |
@@ -293,6 +293,9 @@ static inline bool key_is_instantiated(const struct key *key) | |||
293 | (rcu_dereference_protected((KEY)->payload.rcudata, \ | 293 | (rcu_dereference_protected((KEY)->payload.rcudata, \ |
294 | rwsem_is_locked(&((struct key *)(KEY))->sem))) | 294 | rwsem_is_locked(&((struct key *)(KEY))->sem))) |
295 | 295 | ||
296 | #define rcu_assign_keypointer(KEY, PAYLOAD) \ | ||
297 | (rcu_assign_pointer((KEY)->payload.rcudata, PAYLOAD)) | ||
298 | |||
296 | #ifdef CONFIG_SYSCTL | 299 | #ifdef CONFIG_SYSCTL |
297 | extern ctl_table key_sysctls[]; | 300 | extern ctl_table key_sysctls[]; |
298 | #endif | 301 | #endif |