diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2008-03-27 13:06:26 +0100 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-04-23 06:05:09 +0200 |
commit | 97e7e0f71d6d948c25f11f0a33878d9356d9579e (patch) | |
tree | 2db3bcf3b4f47995308187eec7f3a61d67446dfa /fs/namespace.c | |
parent | [patch 6/7] vfs: mountinfo: add /proc/<pid>/mountinfo (diff) | |
download | linux-97e7e0f71d6d948c25f11f0a33878d9356d9579e.tar.xz linux-97e7e0f71d6d948c25f11f0a33878d9356d9579e.zip |
[patch 7/7] vfs: mountinfo: show dominating group id
Show peer group ID of nearest dominating group that has intersection
with the mount's namespace.
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namespace.c')
-rw-r--r-- | fs/namespace.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/namespace.c b/fs/namespace.c index c807b8d5f891..0505fb61aa74 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -850,8 +850,13 @@ static int show_mountinfo(struct seq_file *m, void *v) /* Tagged fields ("foo:X" or "bar") */ if (IS_MNT_SHARED(mnt)) seq_printf(m, " shared:%i", mnt->mnt_group_id); - if (IS_MNT_SLAVE(mnt)) - seq_printf(m, " master:%i", mnt->mnt_master->mnt_group_id); + if (IS_MNT_SLAVE(mnt)) { + int master = mnt->mnt_master->mnt_group_id; + int dom = get_dominating_id(mnt, &p->root); + seq_printf(m, " master:%i", master); + if (dom && dom != master) + seq_printf(m, " propagate_from:%i", dom); + } if (IS_MNT_UNBINDABLE(mnt)) seq_puts(m, " unbindable"); |