summaryrefslogtreecommitdiffstats
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)
downloadlinux-cb338d06e9716c92d5a7855e7c67b8f111ced722.tar.bz2
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,
int propagate_mnt(struct vfsmount *dest_mnt, struct dentry *dest_dentry,
struct vfsmount *source_mnt, struct list_head *tree_list)
{
- struct vfsmount *m, *child;
+ struct vfsmount *m;
+ struct mount *child;
int ret = 0;
struct vfsmount *prev_dest_mnt = dest_mnt;
struct vfsmount *prev_src_mnt = source_mnt;
@@ -245,23 +246,23 @@ int propagate_mnt(struct vfsmount *dest_mnt, struct dentry *dest_dentry,
}
if (is_subdir(dest_dentry, m->mnt_root)) {
- mnt_set_mountpoint(m, dest_dentry, child);
- list_add_tail(&child->mnt_hash, tree_list);
+ mnt_set_mountpoint(m, dest_dentry, &child->mnt);
+ list_add_tail(&child->mnt.mnt_hash, tree_list);
} else {
/*
* This can happen if the parent mount was bind mounted
* on some subdirectory of a shared/slave mount.
*/
- list_add_tail(&child->mnt_hash, &tmp_list);
+ list_add_tail(&child->mnt.mnt_hash, &tmp_list);
}
prev_dest_mnt = m;
- prev_src_mnt = child;
+ prev_src_mnt = &child->mnt;
}
out:
br_write_lock(vfsmount_lock);
while (!list_empty(&tmp_list)) {
- child = list_first_entry(&tmp_list, struct vfsmount, mnt_hash);
- umount_tree(child, 0, &umount_list);
+ child = list_first_entry(&tmp_list, struct mount, mnt.mnt_hash);
+ umount_tree(&child->mnt, 0, &umount_list);
}
br_write_unlock(vfsmount_lock);
release_mounts(&umount_list);