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
committerAl Viro <viro@zeniv.linux.org.uk>2012-07-14 08:32:48 -0400
commit6ce6e24e72233073c8ead9419fc5040d44803dae (patch)
treeb66a74dd7aef822b4bc573ab283e21320bcc0b25 /fs/namespace.c
parentf7a99c5b7c8bd3d3f533c8b38274e33f3da9096e (diff)
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>
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 a524ea4dbd80..8f412abcb67f 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -923,7 +923,7 @@ EXPORT_SYMBOL(replace_mount_options);
923/* iterator; we want it to have access to namespace_sem, thus here... */ 923/* iterator; we want it to have access to namespace_sem, thus here... */
924static void *m_start(struct seq_file *m, loff_t *pos) 924static void *m_start(struct seq_file *m, loff_t *pos)
925{ 925{
926 struct proc_mounts *p = container_of(m, struct proc_mounts, m); 926 struct proc_mounts *p = proc_mounts(m);
927 927
928 down_read(&namespace_sem); 928 down_read(&namespace_sem);
929 return seq_list_start(&p->ns->list, *pos); 929 return seq_list_start(&p->ns->list, *pos);
@@ -931,7 +931,7 @@ static void *m_start(struct seq_file *m, loff_t *pos)
931 931
932static void *m_next(struct seq_file *m, void *v, loff_t *pos) 932static void *m_next(struct seq_file *m, void *v, loff_t *pos)
933{ 933{
934 struct proc_mounts *p = container_of(m, struct proc_mounts, m); 934 struct proc_mounts *p = proc_mounts(m);
935 935
936 return seq_list_next(v, &p->ns->list, pos); 936 return seq_list_next(v, &p->ns->list, pos);
937} 937}
@@ -943,7 +943,7 @@ static void m_stop(struct seq_file *m, void *v)
943 943
944static int m_show(struct seq_file *m, void *v) 944static int m_show(struct seq_file *m, void *v)
945{ 945{
946 struct proc_mounts *p = container_of(m, struct proc_mounts, m); 946 struct proc_mounts *p = proc_mounts(m);
947 struct mount *r = list_entry(v, struct mount, mnt_list); 947 struct mount *r = list_entry(v, struct mount, mnt_list);
948 return p->show(m, &r->mnt); 948 return p->show(m, &r->mnt);
949} 949}