diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2011-11-25 00:07:16 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-01-03 22:57:08 -0500 |
commit | d10e8def07fc87488c396d2eff2c26c43bb541dd (patch) | |
tree | d0ad0d4c47838a096aafac353e206861cb6d62c1 /fs/pnode.c | |
parent | 14cf1fa8f54353d9caf6174c1e4280c8c4dcfd7a (diff) |
vfs: take mnt_master to struct mount
make IS_MNT_SLAVE take struct mount * at the same time
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/pnode.c')
-rw-r--r-- | fs/pnode.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/fs/pnode.c b/fs/pnode.c index 0e1de28b1b2e..3ac44d15fe58 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.mnt_master); m != NULL; m = real_mount(m->mnt.mnt_master)) { | 58 | for (m = real_mount(mnt->mnt_master); m != NULL; m = real_mount(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,8 +66,8 @@ 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.mnt_master); | 69 | struct mount *peer_mnt = mnt, *master = real_mount(mnt->mnt_master); |
70 | struct vfsmount *slave_mnt; | 70 | struct mount *slave_mnt; |
71 | 71 | ||
72 | /* | 72 | /* |
73 | * slave 'mnt' to a peer mount that has the | 73 | * slave 'mnt' to a peer mount that has the |
@@ -92,7 +92,7 @@ static int do_make_slave(struct mount *mnt) | |||
92 | master = peer_mnt; | 92 | master = peer_mnt; |
93 | 93 | ||
94 | if (master) { | 94 | if (master) { |
95 | list_for_each_entry(slave_mnt, &mnt->mnt.mnt_slave_list, 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->mnt; |
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); |
@@ -101,12 +101,12 @@ static int do_make_slave(struct mount *mnt) | |||
101 | struct list_head *p = &mnt->mnt.mnt_slave_list; | 101 | struct list_head *p = &mnt->mnt.mnt_slave_list; |
102 | while (!list_empty(p)) { | 102 | while (!list_empty(p)) { |
103 | slave_mnt = list_first_entry(p, | 103 | slave_mnt = list_first_entry(p, |
104 | struct vfsmount, mnt_slave); | 104 | struct mount, mnt.mnt_slave); |
105 | list_del_init(&slave_mnt->mnt_slave); | 105 | list_del_init(&slave_mnt->mnt.mnt_slave); |
106 | slave_mnt->mnt_master = NULL; | 106 | slave_mnt->mnt_master = NULL; |
107 | } | 107 | } |
108 | } | 108 | } |
109 | mnt->mnt.mnt_master = &master->mnt; | 109 | mnt->mnt_master = &master->mnt; |
110 | CLEAR_MNT_SHARED(&mnt->mnt); | 110 | CLEAR_MNT_SHARED(&mnt->mnt); |
111 | return 0; | 111 | return 0; |
112 | } | 112 | } |
@@ -123,7 +123,7 @@ void change_mnt_propagation(struct mount *mnt, int type) | |||
123 | do_make_slave(mnt); | 123 | do_make_slave(mnt); |
124 | if (type != MS_SLAVE) { | 124 | if (type != MS_SLAVE) { |
125 | list_del_init(&mnt->mnt.mnt_slave); | 125 | list_del_init(&mnt->mnt.mnt_slave); |
126 | mnt->mnt.mnt_master = NULL; | 126 | mnt->mnt_master = NULL; |
127 | if (type == MS_UNBINDABLE) | 127 | if (type == MS_UNBINDABLE) |
128 | mnt->mnt.mnt_flags |= MNT_UNBINDABLE; | 128 | mnt->mnt.mnt_flags |= MNT_UNBINDABLE; |
129 | else | 129 | else |
@@ -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.mnt_master); | 152 | struct mount *master = real_mount(m->mnt_master); |
153 | 153 | ||
154 | if (&master->mnt == origin->mnt.mnt_master) { | 154 | if (&master->mnt == 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.mnt_master) { | 182 | while (&last_dest->mnt != 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.mnt_master); | 185 | last_dest = real_mount(last_dest->mnt_master); |
186 | last_src = real_mount(last_src->mnt.mnt_master); | 186 | last_src = real_mount(last_src->mnt_master); |
187 | } | 187 | } |
188 | 188 | ||
189 | if (p_last_dest) { | 189 | if (p_last_dest) { |