summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2024-11-25 17:10:25 +0300
committerChristian Brauner <brauner@kernel.org>2024-12-02 13:25:14 +0300
commit6efbb80490a545cfd9f87ebd9225879d8cdbed93 (patch)
treea1d0d7d15440f142534fe3f3b3722b72ded01804
parent4fa6af563d4dcef43ae34a9bce9d1a9440f20867 (diff)
downloadlinux-6efbb80490a545cfd9f87ebd9225879d8cdbed93.tar.xz
cred: remove unused get_new_cred()
This helper is not used anymore so remove it. Link: https://lore.kernel.org/r/20241125-work-cred-v2-29-68b9d38bb5b2@kernel.org Reviewed-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Christian Brauner <brauner@kernel.org>
-rw-r--r--Documentation/security/credentials.rst5
-rw-r--r--include/linux/cred.h13
2 files changed, 0 insertions, 18 deletions
diff --git a/Documentation/security/credentials.rst b/Documentation/security/credentials.rst
index 357328d566c8..2aa0791bcefe 100644
--- a/Documentation/security/credentials.rst
+++ b/Documentation/security/credentials.rst
@@ -527,11 +527,6 @@ There are some functions to help manage credentials:
This gets a reference on a live set of credentials, returning a pointer to
that set of credentials.
- - ``struct cred *get_new_cred(struct cred *cred);``
-
- This gets a reference on a set of credentials that is under construction
- and is thus still mutable, returning a pointer to that set of credentials.
-
Open File Credentials
=====================
diff --git a/include/linux/cred.h b/include/linux/cred.h
index a7df1c759ef0..360f5fd3854b 100644
--- a/include/linux/cred.h
+++ b/include/linux/cred.h
@@ -201,19 +201,6 @@ static inline struct cred *get_new_cred_many(struct cred *cred, int nr)
}
/**
- * get_new_cred - Get a reference on a new set of credentials
- * @cred: The new credentials to reference
- *
- * Get a reference on the specified set of new credentials. The caller must
- * release the reference.
- */
-static inline struct cred *get_new_cred(const struct cred *cred)
-{
- struct cred *nonconst_cred = (struct cred *) cred;
- return get_new_cred_many(nonconst_cred, 1);
-}
-
-/**
* get_cred_many - Get references on a set of credentials
* @cred: The credentials to reference
* @nr: Number of references to acquire