summaryrefslogtreecommitdiff
path: root/fs/proc/array.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2018-05-16 07:19:01 +0200
committerChristoph Hellwig <hch@lst.de>2018-05-16 07:23:35 +0200
commit76f668be1e8e87d235fbd50037f50fdde948b46d (patch)
tree6473ada6105603c2705588b0749fa7cfb4b80176 /fs/proc/array.c
parent441bc62741e6e7f8d428b827c2a7b482a467fc42 (diff)
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 <ebiederm@xmission.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/proc/array.c')
-rw-r--r--fs/proc/array.c7
1 files changed, 1 insertions, 6 deletions
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;
}