From 76f668be1e8e87d235fbd50037f50fdde948b46d Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Wed, 16 May 2018 07:19:01 +0200 Subject: proc: introduce a proc_pid_ns helper Factor out retrieving the per-sb pid namespaces from the sb private data into an easier to understand helper. Suggested-by: Eric W. Biederman Signed-off-by: Christoph Hellwig --- fs/proc/array.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'fs/proc/array.c') diff --git a/fs/proc/array.c b/fs/proc/array.c index ae2c807fd719..911f66924d81 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c @@ -677,12 +677,7 @@ out: static int children_seq_show(struct seq_file *seq, void *v) { - struct inode *inode = seq->private; - pid_t pid; - - pid = pid_nr_ns(v, inode->i_sb->s_fs_info); - seq_printf(seq, "%d ", pid); - + seq_printf(seq, "%d ", pid_nr_ns(v, proc_pid_ns(seq->private))); return 0; } -- cgit v1.2.3