]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - include/linux/pid_namespace.h
Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
[linux.git] / include / linux / pid_namespace.h
index c78af6061644f35f4dec749665a6422da2aba8ad..49538b172483c4f519100e1617f42d0f897bfbaa 100644 (file)
 #include <linux/nsproxy.h>
 #include <linux/kref.h>
 #include <linux/ns_common.h>
+#include <linux/idr.h>
 
-struct pidmap {
-       atomic_t nr_free;
-       void *page;
-};
-
-#define BITS_PER_PAGE          (PAGE_SIZE * 8)
-#define BITS_PER_PAGE_MASK     (BITS_PER_PAGE-1)
-#define PIDMAP_ENTRIES         ((PID_MAX_LIMIT+BITS_PER_PAGE-1)/BITS_PER_PAGE)
 
 struct fs_pin;
 
@@ -30,10 +23,9 @@ enum { /* definitions for pid_namespace's hide_pid field */
 
 struct pid_namespace {
        struct kref kref;
-       struct pidmap pidmap[PIDMAP_ENTRIES];
+       struct idr idr;
        struct rcu_head rcu;
-       int last_pid;
-       unsigned int nr_hashed;
+       unsigned int pid_allocated;
        struct task_struct *child_reaper;
        struct kmem_cache *pid_cachep;
        unsigned int level;
@@ -57,7 +49,7 @@ struct pid_namespace {
 
 extern struct pid_namespace init_pid_ns;
 
-#define PIDNS_HASH_ADDING (1U << 31)
+#define PIDNS_ADDING (1U << 31)
 
 #ifdef CONFIG_PID_NS
 static inline struct pid_namespace *get_pid_ns(struct pid_namespace *ns)
@@ -106,6 +98,6 @@ static inline int reboot_pid_ns(struct pid_namespace *pid_ns, int cmd)
 
 extern struct pid_namespace *task_active_pid_ns(struct task_struct *tsk);
 void pidhash_init(void);
-void pidmap_init(void);
+void pid_idr_init(void);
 
 #endif /* _LINUX_PID_NS_H */