diff options
Diffstat (limited to 'include/linux/cred.h')
-rw-r--r-- | include/linux/cred.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/cred.h b/include/linux/cred.h index 4221ec6000c1..166ce4ddba64 100644 --- a/include/linux/cred.h +++ b/include/linux/cred.h | |||
@@ -147,8 +147,9 @@ static inline struct cred *get_cred(struct cred *cred) | |||
147 | * Release a reference to a set of credentials, deleting them when the last ref | 147 | * Release a reference to a set of credentials, deleting them when the last ref |
148 | * is released. | 148 | * is released. |
149 | */ | 149 | */ |
150 | static inline void put_cred(struct cred *cred) | 150 | static inline void put_cred(const struct cred *_cred) |
151 | { | 151 | { |
152 | struct cred *cred = (struct cred *) _cred; | ||
152 | if (atomic_dec_and_test(&(cred)->usage)) | 153 | if (atomic_dec_and_test(&(cred)->usage)) |
153 | __put_cred(cred); | 154 | __put_cred(cred); |
154 | } | 155 | } |