Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1236755 > unrolled thread

[RFC 4/4] pid_namespace: disable_pid_allocation is unused for !CONFIG_PID_NS

Started byRasmus Villemoes <linux@rasmusvillemoes.dk>
First post2015-09-30 23:00 +0200
Last post2015-09-30 23:00 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [RFC 4/4] pid_namespace: disable_pid_allocation is unused for !CONFIG_PID_NS Rasmus Villemoes <linux@rasmusvillemoes.dk> - 2015-09-30 23:00 +0200

#1236755 — [RFC 4/4] pid_namespace: disable_pid_allocation is unused for !CONFIG_PID_NS

FromRasmus Villemoes <linux@rasmusvillemoes.dk>
Date2015-09-30 23:00 +0200
Subject[RFC 4/4] pid_namespace: disable_pid_allocation is unused for !CONFIG_PID_NS
Message-ID<qewDM-7OB-21@gated-at.bofh.it>
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web