Skip to content

Commit 6efbb80

Browse files
committed
cred: remove unused get_new_cred()
This helper is not used anymore so remove it. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Jeff Layton <[email protected]> Reviewed-by: Jens Axboe <[email protected]> Signed-off-by: Christian Brauner <[email protected]>
1 parent 4fa6af5 commit 6efbb80

File tree

2 files changed

+0
-18
lines changed

2 files changed

+0
-18
lines changed

Documentation/security/credentials.rst

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -527,11 +527,6 @@ There are some functions to help manage credentials:
527527
This gets a reference on a live set of credentials, returning a pointer to
528528
that set of credentials.
529529

530-
- ``struct cred *get_new_cred(struct cred *cred);``
531-
532-
This gets a reference on a set of credentials that is under construction
533-
and is thus still mutable, returning a pointer to that set of credentials.
534-
535530

536531
Open File Credentials
537532
=====================

include/linux/cred.h

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -200,19 +200,6 @@ static inline struct cred *get_new_cred_many(struct cred *cred, int nr)
200200
return cred;
201201
}
202202

203-
/**
204-
* get_new_cred - Get a reference on a new set of credentials
205-
* @cred: The new credentials to reference
206-
*
207-
* Get a reference on the specified set of new credentials. The caller must
208-
* release the reference.
209-
*/
210-
static inline struct cred *get_new_cred(const struct cred *cred)
211-
{
212-
struct cred *nonconst_cred = (struct cred *) cred;
213-
return get_new_cred_many(nonconst_cred, 1);
214-
}
215-
216203
/**
217204
* get_cred_many - Get references on a set of credentials
218205
* @cred: The credentials to reference

0 commit comments

Comments
 (0)