aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/namespace.c12
-rw-r--r--fs/pnode.c12
-rw-r--r--fs/pnode.h2
3 files changed, 13 insertions, 13 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index 65d011fe982f..8432344333da 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1595,23 +1595,23 @@ static int attach_recursive_mnt(struct mount *source_mnt,
1595 struct path *path, struct path *parent_path) 1595 struct path *path, struct path *parent_path)
1596{ 1596{
1597 LIST_HEAD(tree_list); 1597 LIST_HEAD(tree_list);
1598 struct vfsmount *dest_mnt = path->mnt; 1598 struct mount *dest_mnt = real_mount(path->mnt);
1599 struct dentry *dest_dentry = path->dentry; 1599 struct dentry *dest_dentry = path->dentry;
1600 struct mount *child, *p; 1600 struct mount *child, *p;
1601 int err; 1601 int err;
1602 1602
1603 if (IS_MNT_SHARED(dest_mnt)) { 1603 if (IS_MNT_SHARED(&dest_mnt->mnt)) {
1604 err = invent_group_ids(source_mnt, true); 1604 err = invent_group_ids(source_mnt, true);
1605 if (err) 1605 if (err)
1606 goto out; 1606 goto out;
1607 } 1607 }
1608 err = propagate_mnt(dest_mnt, dest_dentry, &source_mnt->mnt, &tree_list); 1608 err = propagate_mnt(dest_mnt, dest_dentry, source_mnt, &tree_list);
1609 if (err) 1609 if (err)
1610 goto out_cleanup_ids; 1610 goto out_cleanup_ids;
1611 1611
1612 br_write_lock(vfsmount_lock); 1612 br_write_lock(vfsmount_lock);
1613 1613
1614 if (IS_MNT_SHARED(dest_mnt)) { 1614 if (IS_MNT_SHARED(&dest_mnt->mnt)) {
1615 for (p = source_mnt; p; p = next_mnt(p, &source_mnt->mnt)) 1615 for (p = source_mnt; p; p = next_mnt(p, &source_mnt->mnt))
1616 set_mnt_shared(p); 1616 set_mnt_shared(p);
1617 } 1617 }
@@ -1620,7 +1620,7 @@ static int attach_recursive_mnt(struct mount *source_mnt,
1620 attach_mnt(source_mnt, path); 1620 attach_mnt(source_mnt, path);
1621 touch_mnt_namespace(parent_path->mnt->mnt_ns); 1621 touch_mnt_namespace(parent_path->mnt->mnt_ns);
1622 } else { 1622 } else {
1623 mnt_set_mountpoint(dest_mnt, dest_dentry, source_mnt); 1623 mnt_set_mountpoint(&dest_mnt->mnt, dest_dentry, source_mnt);
1624 commit_tree(source_mnt); 1624 commit_tree(source_mnt);
1625 } 1625 }
1626 1626
@@ -1633,7 +1633,7 @@ static int attach_recursive_mnt(struct mount *source_mnt,
1633 return 0; 1633 return 0;
1634 1634
1635 out_cleanup_ids: 1635 out_cleanup_ids:
1636 if (IS_MNT_SHARED(dest_mnt)) 1636 if (IS_MNT_SHARED(&dest_mnt->mnt))
1637 cleanup_group_ids(source_mnt, NULL); 1637 cleanup_group_ids(source_mnt, NULL);
1638 out: 1638 out:
1639 return err; 1639 return err;
diff --git a/fs/pnode.c b/fs/pnode.c
index f86cd4bc31ce..6519b3b4eb15 100644
--- a/fs/pnode.c
+++ b/fs/pnode.c
@@ -217,18 +217,18 @@ static struct mount *get_source(struct mount *dest,
217 * @source_mnt: source mount. 217 * @source_mnt: source mount.
218 * @tree_list : list of heads of trees to be attached. 218 * @tree_list : list of heads of trees to be attached.
219 */ 219 */
220int propagate_mnt(struct vfsmount *dest_mnt, struct dentry *dest_dentry, 220int propagate_mnt(struct mount *dest_mnt, struct dentry *dest_dentry,
221 struct vfsmount *source_mnt, struct list_head *tree_list) 221 struct mount *source_mnt, struct list_head *tree_list)
222{ 222{
223 struct mount *m, *child; 223 struct mount *m, *child;
224 int ret = 0; 224 int ret = 0;
225 struct mount *prev_dest_mnt = real_mount(dest_mnt); 225 struct mount *prev_dest_mnt = dest_mnt;
226 struct mount *prev_src_mnt = real_mount(source_mnt); 226 struct mount *prev_src_mnt = source_mnt;
227 LIST_HEAD(tmp_list); 227 LIST_HEAD(tmp_list);
228 LIST_HEAD(umount_list); 228 LIST_HEAD(umount_list);
229 229
230 for (m = propagation_next(real_mount(dest_mnt), real_mount(dest_mnt)); m; 230 for (m = propagation_next(dest_mnt, dest_mnt); m;
231 m = propagation_next(m, real_mount(dest_mnt))) { 231 m = propagation_next(m, dest_mnt)) {
232 int type; 232 int type;
233 struct mount *source; 233 struct mount *source;
234 234
diff --git a/fs/pnode.h b/fs/pnode.h
index 33f1e3cb3cd2..55546a2f9b51 100644
--- a/fs/pnode.h
+++ b/fs/pnode.h
@@ -30,7 +30,7 @@ static inline void set_mnt_shared(struct mount *mnt)
30} 30}
31 31
32void change_mnt_propagation(struct mount *, int); 32void change_mnt_propagation(struct mount *, int);
33int propagate_mnt(struct vfsmount *, struct dentry *, struct vfsmount *, 33int propagate_mnt(struct mount *, struct dentry *, struct mount *,
34 struct list_head *); 34 struct list_head *);
35int propagate_umount(struct list_head *); 35int propagate_umount(struct list_head *);
36int propagate_mount_busy(struct mount *, int); 36int propagate_mount_busy(struct mount *, int);