From 7c733a6e7f1caa59c25830eac1d00913a5c3064a Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sat, 9 Jun 2012 01:16:59 -0400 Subject: 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 (cherry picked from commit 6ce6e24e72233073c8ead9419fc5040d44803dae) --- fs/namespace.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'fs/namespace.c') diff --git a/fs/namespace.c b/fs/namespace.c index 0fd3f8a0ecf..f334285ecdb 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -900,7 +900,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); @@ -908,7 +908,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); } @@ -1022,7 +1022,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 }; -- cgit v1.2.3