From 6ce6e24e72233073c8ead9419fc5040d44803dae 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 --- fs/mount.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'fs/mount.h') 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) } struct proc_mounts { - struct seq_file m; /* must be the first element */ + struct seq_file m; struct mnt_namespace *ns; struct path root; int (*show)(struct seq_file *, struct vfsmount *); }; +#define proc_mounts(p) (container_of((p), struct proc_mounts, m)) + extern const struct seq_operations mounts_op; -- cgit v1.2.3-55-g7522