diff options
-rw-r--r-- | fs/mount.h | 2 | ||||
-rw-r--r-- | fs/namespace.c | 4 | ||||
-rw-r--r-- | fs/pnode.c | 18 |
3 files changed, 12 insertions, 12 deletions
diff --git a/fs/mount.h b/fs/mount.h index 7071d8fa9307..d4db4c7e1815 100644 --- a/fs/mount.h +++ b/fs/mount.h | |||
@@ -20,7 +20,7 @@ struct mount { | |||
20 | struct list_head mnt_mounts; /* list of children, anchored here */ | 20 | struct list_head mnt_mounts; /* list of children, anchored here */ |
21 | struct list_head mnt_child; /* and going through their mnt_child */ | 21 | struct list_head mnt_child; /* and going through their mnt_child */ |
22 | /* yet to be moved - up to mnt_slave */ | 22 | /* yet to be moved - up to mnt_slave */ |
23 | struct vfsmount *mnt_master; /* slave is on master->mnt_slave_list */ | 23 | struct mount *mnt_master; /* slave is on master->mnt_slave_list */ |
24 | }; | 24 | }; |
25 | 25 | ||
26 | static inline struct mount *real_mount(struct vfsmount *mnt) | 26 | static inline struct mount *real_mount(struct vfsmount *mnt) |
diff --git a/fs/namespace.c b/fs/namespace.c index 3439042fc9f2..847b7240c512 100644 --- a/fs/namespace.c +++ b/fs/namespace.c | |||
@@ -715,7 +715,7 @@ static struct mount *clone_mnt(struct mount *old, struct dentry *root, | |||
715 | 715 | ||
716 | if (flag & CL_SLAVE) { | 716 | if (flag & CL_SLAVE) { |
717 | list_add(&mnt->mnt.mnt_slave, &old->mnt.mnt_slave_list); | 717 | list_add(&mnt->mnt.mnt_slave, &old->mnt.mnt_slave_list); |
718 | mnt->mnt_master = &old->mnt; | 718 | mnt->mnt_master = old; |
719 | CLEAR_MNT_SHARED(&mnt->mnt); | 719 | CLEAR_MNT_SHARED(&mnt->mnt); |
720 | } else if (!(flag & CL_PRIVATE)) { | 720 | } else if (!(flag & CL_PRIVATE)) { |
721 | if ((flag & CL_MAKE_SHARED) || IS_MNT_SHARED(&old->mnt)) | 721 | if ((flag & CL_MAKE_SHARED) || IS_MNT_SHARED(&old->mnt)) |
@@ -1052,7 +1052,7 @@ static int show_mountinfo(struct seq_file *m, void *v) | |||
1052 | if (IS_MNT_SHARED(mnt)) | 1052 | if (IS_MNT_SHARED(mnt)) |
1053 | seq_printf(m, " shared:%i", mnt->mnt_group_id); | 1053 | seq_printf(m, " shared:%i", mnt->mnt_group_id); |
1054 | if (IS_MNT_SLAVE(r)) { | 1054 | if (IS_MNT_SLAVE(r)) { |
1055 | int master = r->mnt_master->mnt_group_id; | 1055 | int master = r->mnt_master->mnt.mnt_group_id; |
1056 | int dom = get_dominating_id(r, &p->root); | 1056 | int dom = get_dominating_id(r, &p->root); |
1057 | seq_printf(m, " master:%i", master); | 1057 | seq_printf(m, " master:%i", master); |
1058 | if (dom && dom != master) | 1058 | if (dom && dom != master) |
diff --git a/fs/pnode.c b/fs/pnode.c index 3ac44d15fe58..9bf22b61f8fb 100644 --- a/fs/pnode.c +++ b/fs/pnode.c | |||
@@ -55,7 +55,7 @@ int get_dominating_id(struct mount *mnt, const struct path *root) | |||
55 | { | 55 | { |
56 | struct mount *m; | 56 | struct mount *m; |
57 | 57 | ||
58 | for (m = real_mount(mnt->mnt_master); m != NULL; m = real_mount(m->mnt_master)) { | 58 | for (m = mnt->mnt_master; m != NULL; m = m->mnt_master) { |
59 | struct mount *d = get_peer_under_root(m, mnt->mnt.mnt_ns, root); | 59 | struct mount *d = get_peer_under_root(m, mnt->mnt.mnt_ns, root); |
60 | if (d) | 60 | if (d) |
61 | return d->mnt.mnt_group_id; | 61 | return d->mnt.mnt_group_id; |
@@ -66,7 +66,7 @@ int get_dominating_id(struct mount *mnt, const struct path *root) | |||
66 | 66 | ||
67 | static int do_make_slave(struct mount *mnt) | 67 | static int do_make_slave(struct mount *mnt) |
68 | { | 68 | { |
69 | struct mount *peer_mnt = mnt, *master = real_mount(mnt->mnt_master); | 69 | struct mount *peer_mnt = mnt, *master = mnt->mnt_master; |
70 | struct mount *slave_mnt; | 70 | struct mount *slave_mnt; |
71 | 71 | ||
72 | /* | 72 | /* |
@@ -93,7 +93,7 @@ static int do_make_slave(struct mount *mnt) | |||
93 | 93 | ||
94 | if (master) { | 94 | if (master) { |
95 | list_for_each_entry(slave_mnt, &mnt->mnt.mnt_slave_list, mnt.mnt_slave) | 95 | list_for_each_entry(slave_mnt, &mnt->mnt.mnt_slave_list, mnt.mnt_slave) |
96 | slave_mnt->mnt_master = &master->mnt; | 96 | slave_mnt->mnt_master = master; |
97 | list_move(&mnt->mnt.mnt_slave, &master->mnt.mnt_slave_list); | 97 | list_move(&mnt->mnt.mnt_slave, &master->mnt.mnt_slave_list); |
98 | list_splice(&mnt->mnt.mnt_slave_list, master->mnt.mnt_slave_list.prev); | 98 | list_splice(&mnt->mnt.mnt_slave_list, master->mnt.mnt_slave_list.prev); |
99 | INIT_LIST_HEAD(&mnt->mnt.mnt_slave_list); | 99 | INIT_LIST_HEAD(&mnt->mnt.mnt_slave_list); |
@@ -106,7 +106,7 @@ static int do_make_slave(struct mount *mnt) | |||
106 | slave_mnt->mnt_master = NULL; | 106 | slave_mnt->mnt_master = NULL; |
107 | } | 107 | } |
108 | } | 108 | } |
109 | mnt->mnt_master = &master->mnt; | 109 | mnt->mnt_master = master; |
110 | CLEAR_MNT_SHARED(&mnt->mnt); | 110 | CLEAR_MNT_SHARED(&mnt->mnt); |
111 | return 0; | 111 | return 0; |
112 | } | 112 | } |
@@ -149,9 +149,9 @@ static struct mount *propagation_next(struct mount *m, | |||
149 | return first_slave(m); | 149 | return first_slave(m); |
150 | 150 | ||
151 | while (1) { | 151 | while (1) { |
152 | struct mount *master = real_mount(m->mnt_master); | 152 | struct mount *master = m->mnt_master; |
153 | 153 | ||
154 | if (&master->mnt == origin->mnt_master) { | 154 | if (master == origin->mnt_master) { |
155 | struct mount *next = next_peer(m); | 155 | struct mount *next = next_peer(m); |
156 | return (next == origin) ? NULL : next; | 156 | return (next == origin) ? NULL : next; |
157 | } else if (m->mnt.mnt_slave.next != &master->mnt.mnt_slave_list) | 157 | } else if (m->mnt.mnt_slave.next != &master->mnt.mnt_slave_list) |
@@ -179,11 +179,11 @@ static struct mount *get_source(struct mount *dest, | |||
179 | struct mount *p_last_src = NULL; | 179 | struct mount *p_last_src = NULL; |
180 | struct mount *p_last_dest = NULL; | 180 | struct mount *p_last_dest = NULL; |
181 | 181 | ||
182 | while (&last_dest->mnt != dest->mnt_master) { | 182 | while (last_dest != dest->mnt_master) { |
183 | p_last_dest = last_dest; | 183 | p_last_dest = last_dest; |
184 | p_last_src = last_src; | 184 | p_last_src = last_src; |
185 | last_dest = real_mount(last_dest->mnt_master); | 185 | last_dest = last_dest->mnt_master; |
186 | last_src = real_mount(last_src->mnt_master); | 186 | last_src = last_src->mnt_master; |
187 | } | 187 | } |
188 | 188 | ||
189 | if (p_last_dest) { | 189 | if (p_last_dest) { |