summaryrefslogtreecommitdiff
path: root/include/linux/cred.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/cred.h')
-rw-r--r--include/linux/cred.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/cred.h b/include/linux/cred.h
index e4a3155fe409..b0bc1fea9ca0 100644
--- a/include/linux/cred.h
+++ b/include/linux/cred.h
@@ -211,9 +211,10 @@ static inline struct cred *get_new_cred_many(struct cred *cred, int nr)
* Get a reference on the specified set of new credentials. The caller must
* release the reference.
*/
-static inline struct cred *get_new_cred(struct cred *cred)
+static inline struct cred *get_new_cred(const struct cred *cred)
{
- return get_new_cred_many(cred, 1);
+ struct cred *nonconst_cred = (struct cred *) cred;
+ return get_new_cred_many(nonconst_cred, 1);
}
/**