[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1460417755-18201-4-git-send-email-avagin@openvz.org>
Date: Mon, 11 Apr 2016 16:35:43 -0700
From: Andrey Vagin <avagin@...nvz.org>
To: linux-kernel@...r.kernel.org
Cc: Andrey Vagin <avagin@...nvz.org>, Oleg Nesterov <oleg@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Cyrill Gorcunov <gorcunov@...nvz.org>,
Pavel Emelyanov <xemul@...allels.com>,
Roger Luethi <rl@...lgate.ch>, Arnd Bergmann <arnd@...db.de>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
David Ahern <dsahern@...il.com>,
Andy Lutomirski <luto@...capital.net>,
Pavel Odintsov <pavel.odintsov@...il.com>
Subject: [PATCH 03/15] proc: export next_tgid()
It's going to be used in task_diag
Signed-off-by: Andrey Vagin <avagin@...nvz.org>
---
fs/proc/base.c | 6 +-----
fs/proc/internal.h | 6 ++++++
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 614f1d0..9e5fd1c 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -3071,11 +3071,7 @@ out:
* Find the first task with tgid >= tgid
*
*/
-struct tgid_iter {
- unsigned int tgid;
- struct task_struct *task;
-};
-static struct tgid_iter next_tgid(struct pid_namespace *ns, struct tgid_iter iter)
+struct tgid_iter next_tgid(struct pid_namespace *ns, struct tgid_iter iter)
{
struct pid *pid;
diff --git a/fs/proc/internal.h b/fs/proc/internal.h
index 49145e2..2a2b1e6 100644
--- a/fs/proc/internal.h
+++ b/fs/proc/internal.h
@@ -304,6 +304,12 @@ extern unsigned long task_statm(struct mm_struct *,
unsigned long *, unsigned long *);
extern void task_mem(struct seq_file *, struct mm_struct *);
+struct tgid_iter {
+ unsigned int tgid;
+ struct task_struct *task;
+};
+struct tgid_iter next_tgid(struct pid_namespace *ns, struct tgid_iter iter);
+
struct task_struct *
task_next_child(struct task_struct *parent, struct task_struct *prev, unsigned int pos);
--
2.5.5
Powered by blists - more mailing lists