aboutsummaryrefslogtreecommitdiffstats
path: root/fs/mount.h
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/mount.h
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/mount.h')
-rw-r--r--fs/mount.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/mount.h b/fs/mount.h
index 05a2a1185efc..4f291f9de641 100644
--- a/fs/mount.h
+++ b/fs/mount.h
@@ -74,10 +74,12 @@ static inline void get_mnt_ns(struct mnt_namespace *ns)
74} 74}
75 75
76struct proc_mounts { 76struct proc_mounts {
77 struct seq_file m; /* must be the first element */ 77 struct seq_file m;
78 struct mnt_namespace *ns; 78 struct mnt_namespace *ns;
79 struct path root; 79 struct path root;
80 int (*show)(struct seq_file *, struct vfsmount *); 80 int (*show)(struct seq_file *, struct vfsmount *);
81}; 81};
82 82
83#define proc_mounts(p) (container_of((p), struct proc_mounts, m))
84
83extern const struct seq_operations mounts_op; 85extern const struct seq_operations mounts_op;