aboutsummaryrefslogtreecommitdiffstats
path: root/fs/pnode.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2011-11-24 20:55:08 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2012-01-03 22:57:01 -0500
commitcb338d06e9716c92d5a7855e7c67b8f111ced722 (patch)
tree6315dfbd50fd6ba44ad468405dd4e7fe21b53618 /fs/pnode.c
parent0f0afb1dcf01afc44581b3c0da251ac07dfb6e4a (diff)
vfs: spread struct mount - clone_mnt/copy_tree result
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/pnode.c')
-rw-r--r--fs/pnode.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/fs/pnode.c b/fs/pnode.c
index 4bd3721867a7..916c8e87cf4e 100644
--- a/fs/pnode.c
+++ b/fs/pnode.c
@@ -221,7 +221,8 @@ static struct vfsmount *get_source(struct vfsmount *dest,
221int propagate_mnt(struct vfsmount *dest_mnt, struct dentry *dest_dentry, 221int propagate_mnt(struct vfsmount *dest_mnt, struct dentry *dest_dentry,
222 struct vfsmount *source_mnt, struct list_head *tree_list) 222 struct vfsmount *source_mnt, struct list_head *tree_list)
223{ 223{
224 struct vfsmount *m, *child; 224 struct vfsmount *m;
225 struct mount *child;
225 int ret = 0; 226 int ret = 0;
226 struct vfsmount *prev_dest_mnt = dest_mnt; 227 struct vfsmount *prev_dest_mnt = dest_mnt;
227 struct vfsmount *prev_src_mnt = source_mnt; 228 struct vfsmount *prev_src_mnt = source_mnt;
@@ -245,23 +246,23 @@ int propagate_mnt(struct vfsmount *dest_mnt, struct dentry *dest_dentry,
245 } 246 }
246 247
247 if (is_subdir(dest_dentry, m->mnt_root)) { 248 if (is_subdir(dest_dentry, m->mnt_root)) {
248 mnt_set_mountpoint(m, dest_dentry, child); 249 mnt_set_mountpoint(m, dest_dentry, &child->mnt);
249 list_add_tail(&child->mnt_hash, tree_list); 250 list_add_tail(&child->mnt.mnt_hash, tree_list);
250 } else { 251 } else {
251 /* 252 /*
252 * This can happen if the parent mount was bind mounted 253 * This can happen if the parent mount was bind mounted
253 * on some subdirectory of a shared/slave mount. 254 * on some subdirectory of a shared/slave mount.
254 */ 255 */
255 list_add_tail(&child->mnt_hash, &tmp_list); 256 list_add_tail(&child->mnt.mnt_hash, &tmp_list);
256 } 257 }
257 prev_dest_mnt = m; 258 prev_dest_mnt = m;
258 prev_src_mnt = child; 259 prev_src_mnt = &child->mnt;
259 } 260 }
260out: 261out:
261 br_write_lock(vfsmount_lock); 262 br_write_lock(vfsmount_lock);
262 while (!list_empty(&tmp_list)) { 263 while (!list_empty(&tmp_list)) {
263 child = list_first_entry(&tmp_list, struct vfsmount, mnt_hash); 264 child = list_first_entry(&tmp_list, struct mount, mnt.mnt_hash);
264 umount_tree(child, 0, &umount_list); 265 umount_tree(&child->mnt, 0, &umount_list);
265 } 266 }
266 br_write_unlock(vfsmount_lock); 267 br_write_unlock(vfsmount_lock);
267 release_mounts(&umount_list); 268 release_mounts(&umount_list);