aboutsummaryrefslogtreecommitdiffstats
path: root/fs/namespace.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2011-11-24 19:47:15 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2012-01-03 22:56:59 -0500
commit4b2619a571f9fbb46649f968eea284103734f718 (patch)
tree041dbe073af6bf96f18de16cb366fed2d336296b /fs/namespace.c
parent419148da6e76dd0d379b5ec33c461cee1015322e (diff)
vfs: spread struct mount - commit_tree
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namespace.c')
-rw-r--r--fs/namespace.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index 444557e04b38..fad3b218679d 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -609,16 +609,16 @@ static inline void __mnt_make_shortterm(struct vfsmount *mnt)
609/* 609/*
610 * vfsmount lock must be held for write 610 * vfsmount lock must be held for write
611 */ 611 */
612static void commit_tree(struct vfsmount *mnt) 612static void commit_tree(struct mount *mnt)
613{ 613{
614 struct vfsmount *parent = mnt->mnt_parent; 614 struct vfsmount *parent = mnt->mnt.mnt_parent;
615 struct vfsmount *m; 615 struct vfsmount *m;
616 LIST_HEAD(head); 616 LIST_HEAD(head);
617 struct mnt_namespace *n = parent->mnt_ns; 617 struct mnt_namespace *n = parent->mnt_ns;
618 618
619 BUG_ON(parent == mnt); 619 BUG_ON(parent == &mnt->mnt);
620 620
621 list_add_tail(&head, &mnt->mnt_list); 621 list_add_tail(&head, &mnt->mnt.mnt_list);
622 list_for_each_entry(m, &head, mnt_list) { 622 list_for_each_entry(m, &head, mnt_list) {
623 m->mnt_ns = n; 623 m->mnt_ns = n;
624 __mnt_make_longterm(m); 624 __mnt_make_longterm(m);
@@ -626,9 +626,9 @@ static void commit_tree(struct vfsmount *mnt)
626 626
627 list_splice(&head, n->list.prev); 627 list_splice(&head, n->list.prev);
628 628
629 list_add_tail(&mnt->mnt_hash, mount_hashtable + 629 list_add_tail(&mnt->mnt.mnt_hash, mount_hashtable +
630 hash(parent, mnt->mnt_mountpoint)); 630 hash(parent, mnt->mnt.mnt_mountpoint));
631 list_add_tail(&mnt->mnt_child, &parent->mnt_mounts); 631 list_add_tail(&mnt->mnt.mnt_child, &parent->mnt_mounts);
632 touch_mnt_namespace(n); 632 touch_mnt_namespace(n);
633} 633}
634 634
@@ -1617,12 +1617,12 @@ static int attach_recursive_mnt(struct vfsmount *source_mnt,
1617 touch_mnt_namespace(parent_path->mnt->mnt_ns); 1617 touch_mnt_namespace(parent_path->mnt->mnt_ns);
1618 } else { 1618 } else {
1619 mnt_set_mountpoint(dest_mnt, dest_dentry, source_mnt); 1619 mnt_set_mountpoint(dest_mnt, dest_dentry, source_mnt);
1620 commit_tree(source_mnt); 1620 commit_tree(real_mount(source_mnt));
1621 } 1621 }
1622 1622
1623 list_for_each_entry_safe(child, p, &tree_list, mnt.mnt_hash) { 1623 list_for_each_entry_safe(child, p, &tree_list, mnt.mnt_hash) {
1624 list_del_init(&child->mnt.mnt_hash); 1624 list_del_init(&child->mnt.mnt_hash);
1625 commit_tree(&child->mnt); 1625 commit_tree(child);
1626 } 1626 }
1627 br_write_unlock(vfsmount_lock); 1627 br_write_unlock(vfsmount_lock);
1628 1628