+struct pid_namespace *task_active_pid_ns(struct task_struct *tsk)
+{
+ return ns_of_pid(task_pid(tsk));
+}
+EXPORT_SYMBOL_GPL(task_active_pid_ns);
+
+/*
+ * Used by proc to find the first pid that is greater than or equal to nr.
+ *
+ * If there is a pid at nr this function is exactly the same as find_pid_ns.
+ */
+struct pid *find_ge_pid(int nr, struct pid_namespace *ns)
+{
+ struct pid *pid;
+
+ do {
+ pid = find_pid_ns(nr, ns);
+ if (pid)
+ break;
+ nr = next_pidmap(ns, nr);
+ } while (nr > 0);
+
+ return pid;