mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] CRED: Delete alloc_creds() as it's not used
@ 2008-09-22 23:10 David Howells
  2008-09-23  6:01 ` James Morris
  0 siblings, 1 reply; 2+ messages in thread
From: David Howells @ 2008-09-22 23:10 UTC (permalink / raw)
  To: akpm, jmorris; +Cc: dhowells, linux-security-module, linux-kernel

Delete alloc_creds() as it's not used.

Signed-off-by: David Howells <dhowells@redhat.com>
---

 kernel/cred-internals.h |    5 -----
 kernel/cred.c           |   15 ---------------
 2 files changed, 0 insertions(+), 20 deletions(-)


diff --git a/kernel/cred-internals.h b/kernel/cred-internals.h
index f16312a..2dc4fc2 100644
--- a/kernel/cred-internals.h
+++ b/kernel/cred-internals.h
@@ -10,11 +10,6 @@
  */
 
 /*
- * cred.c
- */
-extern struct cred *alloc_creds(const struct cred *, gfp_t);
-
-/*
  * user.c
  */
 static inline void sched_switch_user(struct task_struct *p)
diff --git a/kernel/cred.c b/kernel/cred.c
index a68a154..49ed76a 100644
--- a/kernel/cred.c
+++ b/kernel/cred.c
@@ -112,21 +112,6 @@ void __put_cred(struct cred *cred)
 }
 EXPORT_SYMBOL(__put_cred);
 
-/*
- * Allocate new credentials
- */
-struct cred *alloc_creds(const struct cred *old, gfp_t gfp)
-{
-	struct cred *new;
-
-	new = kmem_cache_alloc(cred_jar, GFP_KERNEL);
-	if (!new)
-		return NULL;
-	if (old)
-		memcpy(new, old, sizeof(struct cred));
-	return new;
-}
-
 /**
  * prepare_creds - Prepare a new set of credentials for modification
  *


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-09-23  6:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-22 23:10 [PATCH] CRED: Delete alloc_creds() as it's not used David Howells
2008-09-23  6:01 ` James Morris

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®