diff options
| author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-05-26 00:41:21 +0100 |
|---|---|---|
| committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-05-26 00:41:21 +0100 |
| commit | ae1d3b974e091b5fc9008bd41bcbdaac68110b62 (patch) | |
| tree | 82e50a66925ced79f59ed4504f6e073ef55edee3 /include/linux/key.h | |
| parent | 586893ebc42943008010b4c210cfc9167df615e5 (diff) | |
| parent | 7a2207a0e1142a9b214b323e43ab2ecc592e5b0e (diff) | |
| download | kernel_samsung_aries-ae1d3b974e091b5fc9008bd41bcbdaac68110b62.zip kernel_samsung_aries-ae1d3b974e091b5fc9008bd41bcbdaac68110b62.tar.gz kernel_samsung_aries-ae1d3b974e091b5fc9008bd41bcbdaac68110b62.tar.bz2 | |
Merge branch 'for-rmk' of git://github.com/at91linux/linux-2.6-at91 into devel-stable
Diffstat (limited to 'include/linux/key.h')
| -rw-r--r-- | include/linux/key.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/key.h b/include/linux/key.h index b2bb017..ef19b99 100644 --- a/include/linux/key.h +++ b/include/linux/key.h @@ -276,6 +276,19 @@ static inline key_serial_t key_serial(struct key *key) return key ? key->serial : 0; } +/** + * key_is_instantiated - Determine if a key has been positively instantiated + * @key: The key to check. + * + * Return true if the specified key has been positively instantiated, false + * otherwise. + */ +static inline bool key_is_instantiated(const struct key *key) +{ + return test_bit(KEY_FLAG_INSTANTIATED, &key->flags) && + !test_bit(KEY_FLAG_NEGATIVE, &key->flags); +} + #define rcu_dereference_key(KEY) \ (rcu_dereference_protected((KEY)->payload.rcudata, \ rwsem_is_locked(&((struct key *)(KEY))->sem))) |
