aboutsummaryrefslogtreecommitdiffstats
path: root/fs/namespace.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-06-09 01:16:59 -0400
committerZiyan <jaraidaniel@gmail.com>2016-03-11 16:08:08 +0100
commit4bcd71f9a3f92ac70bece1363a2e0fe46d6fc281 (patch)
tree18315dc86241b3f489b77337ad1d67e536910a2e /fs/namespace.c
parent4f8df79100cd09c3d82a1c770fa0d86d5f1f5f5f (diff)
downloadkernel_samsung_espresso10-4bcd71f9a3f92ac70bece1363a2e0fe46d6fc281.zip
kernel_samsung_espresso10-4bcd71f9a3f92ac70bece1363a2e0fe46d6fc281.tar.gz
kernel_samsung_espresso10-4bcd71f9a3f92ac70bece1363a2e0fe46d6fc281.tar.bz2
get rid of magic in proc_namespace.c
don't rely on proc_mounts->m being the first field; container_of() is there for purpose. No need to bother with ->private, while we are at it - the same container_of will do nicely. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> (cherry picked from commit 6ce6e24e72233073c8ead9419fc5040d44803dae)
Diffstat (limited to 'fs/namespace.c')
-rw-r--r--fs/namespace.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index 33ea7ec..01cfed6 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -894,7 +894,7 @@ EXPORT_SYMBOL(replace_mount_options);
/* iterator */
static void *m_start(struct seq_file *m, loff_t *pos)
{
- struct proc_mounts *p = m->private;
+ struct proc_mounts *p = proc_mounts(m);
down_read(&namespace_sem);
return seq_list_start(&p->ns->list, *pos);
@@ -902,7 +902,7 @@ static void *m_start(struct seq_file *m, loff_t *pos)
static void *m_next(struct seq_file *m, void *v, loff_t *pos)
{
- struct proc_mounts *p = m->private;
+ struct proc_mounts *p = proc_mounts(m);
return seq_list_next(v, &p->ns->list, pos);
}
@@ -1016,7 +1016,7 @@ const struct seq_operations mounts_op = {
static int show_mountinfo(struct seq_file *m, void *v)
{
- struct proc_mounts *p = m->private;
+ struct proc_mounts *p = proc_mounts(m);
struct vfsmount *mnt = list_entry(v, struct vfsmount, mnt_list);
struct super_block *sb = mnt->mnt_sb;
struct path mnt_path = { .dentry = mnt->mnt_root, .mnt = mnt };