Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755545AbcDKXjj (ORCPT ); Mon, 11 Apr 2016 19:39:39 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:34333 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752777AbcDKXgK (ORCPT ); Mon, 11 Apr 2016 19:36:10 -0400 From: Andrey Vagin To: linux-kernel@vger.kernel.org Cc: Andrey Vagin , Oleg Nesterov , Andrew Morton , Cyrill Gorcunov , Pavel Emelyanov , Roger Luethi , Arnd Bergmann , Arnaldo Carvalho de Melo , David Ahern , Andy Lutomirski , Pavel Odintsov Subject: [PATCH 03/15] proc: export next_tgid() Date: Mon, 11 Apr 2016 16:35:43 -0700 Message-Id: <1460417755-18201-4-git-send-email-avagin@openvz.org> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1460417755-18201-1-git-send-email-avagin@openvz.org> References: <1460417755-18201-1-git-send-email-avagin@openvz.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1242 Lines: 44 It's going to be used in task_diag Signed-off-by: Andrey Vagin --- 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