mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
441bc62741
commit
76f668be1e
5 changed files with 19 additions and 20 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue