From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
To: "Eric W. Biederman" <ebiederm@xmission.com>,
Oleg Nesterov <oleg@redhat.com>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>,
linux-kernel@vger.kernel.org
Subject: [RFC 4/4] pid_namespace: disable_pid_allocation is unused for !CONFIG_PID_NS
Date: Wed, 30 Sep 2015 22:49:23 +0200 [thread overview]
Message-ID: <1443646163-31316-5-git-send-email-linux@rasmusvillemoes.dk> (raw)
In-Reply-To: <1443646163-31316-1-git-send-email-linux@rasmusvillemoes.dk>
disable_pid_allocation only has a single caller, in
kernel/pid_namespace.c, so when CONFIG_PID_NS=n we don't need it. I
don't think we need to #ifdef the declaration away, since we'll just
fail at link time rather than compile time, should
disable_pid_allocation ever grow a caller outside pid_namespace.c.
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
---
kernel/pid.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/pid.c b/kernel/pid.c
index d422ddae0484..c9b595517c4f 100644
--- a/kernel/pid.c
+++ b/kernel/pid.c
@@ -358,12 +358,14 @@ out_free:
return ERR_PTR(retval);
}
+#ifdef CONFIG_PID_NS
void disable_pid_allocation(struct pid_namespace *ns)
{
spin_lock_irq(&pidmap_lock);
ns->nr_hashed &= ~PIDNS_HASH_ADDING;
spin_unlock_irq(&pidmap_lock);
}
+#endif
struct pid *find_pid_ns(int nr, struct pid_namespace *ns)
{
--
2.1.3
next prev parent reply other threads:[~2015-09-30 20:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-30 20:49 [RFC 0/4] reduce pid_namespace footprint when not configured Rasmus Villemoes
2015-09-30 20:49 ` [RFC 1/4] pid_namespace: remove ->level and ->parent for !CONFIG_PID_NS Rasmus Villemoes
2015-09-30 20:49 ` [RFC 2/4] pid_namespace: remove .kref field " Rasmus Villemoes
2015-09-30 20:49 ` [RFC 3/4] pid_namespace: make pid_nr_ns and pid_vnr static inlines " Rasmus Villemoes
2015-09-30 20:49 ` Rasmus Villemoes [this message]
2015-09-30 21:00 ` [RFC 0/4] reduce pid_namespace footprint when not configured Eric W. Biederman
2015-09-30 21:34 ` Rasmus Villemoes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1443646163-31316-5-git-send-email-linux@rasmusvillemoes.dk \
--to=linux@rasmusvillemoes.dk \
--cc=ebiederm@xmission.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®