aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/namespace.c24
-rw-r--r--include/linux/mount.h2
2 files changed, 13 insertions, 13 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index b168dc37eaab..587eb0d707ee 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -61,7 +61,7 @@ struct vfsmount *alloc_vfsmnt(const char *name)
61 INIT_LIST_HEAD(&mnt->mnt_child); 61 INIT_LIST_HEAD(&mnt->mnt_child);
62 INIT_LIST_HEAD(&mnt->mnt_mounts); 62 INIT_LIST_HEAD(&mnt->mnt_mounts);
63 INIT_LIST_HEAD(&mnt->mnt_list); 63 INIT_LIST_HEAD(&mnt->mnt_list);
64 INIT_LIST_HEAD(&mnt->mnt_fslink); 64 INIT_LIST_HEAD(&mnt->mnt_expire);
65 if (name) { 65 if (name) {
66 int size = strlen(name)+1; 66 int size = strlen(name)+1;
67 char *newname = kmalloc(size, GFP_KERNEL); 67 char *newname = kmalloc(size, GFP_KERNEL);
@@ -165,8 +165,8 @@ clone_mnt(struct vfsmount *old, struct dentry *root)
165 /* stick the duplicate mount on the same expiry list 165 /* stick the duplicate mount on the same expiry list
166 * as the original if that was on one */ 166 * as the original if that was on one */
167 spin_lock(&vfsmount_lock); 167 spin_lock(&vfsmount_lock);
168 if (!list_empty(&old->mnt_fslink)) 168 if (!list_empty(&old->mnt_expire))
169 list_add(&mnt->mnt_fslink, &old->mnt_fslink); 169 list_add(&mnt->mnt_expire, &old->mnt_expire);
170 spin_unlock(&vfsmount_lock); 170 spin_unlock(&vfsmount_lock);
171 } 171 }
172 return mnt; 172 return mnt;
@@ -351,7 +351,7 @@ static void umount_tree(struct vfsmount *mnt)
351 while (!list_empty(&kill)) { 351 while (!list_empty(&kill)) {
352 mnt = list_entry(kill.next, struct vfsmount, mnt_list); 352 mnt = list_entry(kill.next, struct vfsmount, mnt_list);
353 list_del_init(&mnt->mnt_list); 353 list_del_init(&mnt->mnt_list);
354 list_del_init(&mnt->mnt_fslink); 354 list_del_init(&mnt->mnt_expire);
355 if (mnt->mnt_parent == mnt) { 355 if (mnt->mnt_parent == mnt) {
356 spin_unlock(&vfsmount_lock); 356 spin_unlock(&vfsmount_lock);
357 } else { 357 } else {
@@ -645,7 +645,7 @@ static int do_loopback(struct nameidata *nd, char *old_name, int recurse)
645 if (mnt) { 645 if (mnt) {
646 /* stop bind mounts from expiring */ 646 /* stop bind mounts from expiring */
647 spin_lock(&vfsmount_lock); 647 spin_lock(&vfsmount_lock);
648 list_del_init(&mnt->mnt_fslink); 648 list_del_init(&mnt->mnt_expire);
649 spin_unlock(&vfsmount_lock); 649 spin_unlock(&vfsmount_lock);
650 650
651 err = graft_tree(mnt, nd); 651 err = graft_tree(mnt, nd);
@@ -744,7 +744,7 @@ static int do_move_mount(struct nameidata *nd, char *old_name)
744 744
745 /* if the mount is moved, it should no longer be expire 745 /* if the mount is moved, it should no longer be expire
746 * automatically */ 746 * automatically */
747 list_del_init(&old_nd.mnt->mnt_fslink); 747 list_del_init(&old_nd.mnt->mnt_expire);
748out2: 748out2:
749 spin_unlock(&vfsmount_lock); 749 spin_unlock(&vfsmount_lock);
750out1: 750out1:
@@ -814,7 +814,7 @@ int do_add_mount(struct vfsmount *newmnt, struct nameidata *nd,
814 if (err == 0 && fslist) { 814 if (err == 0 && fslist) {
815 /* add to the specified expiration list */ 815 /* add to the specified expiration list */
816 spin_lock(&vfsmount_lock); 816 spin_lock(&vfsmount_lock);
817 list_add_tail(&newmnt->mnt_fslink, fslist); 817 list_add_tail(&newmnt->mnt_expire, fslist);
818 spin_unlock(&vfsmount_lock); 818 spin_unlock(&vfsmount_lock);
819 } 819 }
820 820
@@ -869,7 +869,7 @@ static void expire_mount(struct vfsmount *mnt, struct list_head *mounts)
869 * Someone brought it back to life whilst we didn't have any 869 * Someone brought it back to life whilst we didn't have any
870 * locks held so return it to the expiration list 870 * locks held so return it to the expiration list
871 */ 871 */
872 list_add_tail(&mnt->mnt_fslink, mounts); 872 list_add_tail(&mnt->mnt_expire, mounts);
873 spin_unlock(&vfsmount_lock); 873 spin_unlock(&vfsmount_lock);
874 } 874 }
875} 875}
@@ -896,13 +896,13 @@ void mark_mounts_for_expiry(struct list_head *mounts)
896 * - still marked for expiry (marked on the last call here; marks are 896 * - still marked for expiry (marked on the last call here; marks are
897 * cleared by mntput()) 897 * cleared by mntput())
898 */ 898 */
899 list_for_each_entry_safe(mnt, next, mounts, mnt_fslink) { 899 list_for_each_entry_safe(mnt, next, mounts, mnt_expire) {
900 if (!xchg(&mnt->mnt_expiry_mark, 1) || 900 if (!xchg(&mnt->mnt_expiry_mark, 1) ||
901 atomic_read(&mnt->mnt_count) != 1) 901 atomic_read(&mnt->mnt_count) != 1)
902 continue; 902 continue;
903 903
904 mntget(mnt); 904 mntget(mnt);
905 list_move(&mnt->mnt_fslink, &graveyard); 905 list_move(&mnt->mnt_expire, &graveyard);
906 } 906 }
907 907
908 /* 908 /*
@@ -912,8 +912,8 @@ void mark_mounts_for_expiry(struct list_head *mounts)
912 * - dispose of the corpse 912 * - dispose of the corpse
913 */ 913 */
914 while (!list_empty(&graveyard)) { 914 while (!list_empty(&graveyard)) {
915 mnt = list_entry(graveyard.next, struct vfsmount, mnt_fslink); 915 mnt = list_entry(graveyard.next, struct vfsmount, mnt_expire);
916 list_del_init(&mnt->mnt_fslink); 916 list_del_init(&mnt->mnt_expire);
917 917
918 /* don't do anything if the namespace is dead - all the 918 /* don't do anything if the namespace is dead - all the
919 * vfsmounts from it are going away anyway */ 919 * vfsmounts from it are going away anyway */
diff --git a/include/linux/mount.h b/include/linux/mount.h
index 8b8d3b9beefd..196d2d6de4a3 100644
--- a/include/linux/mount.h
+++ b/include/linux/mount.h
@@ -34,7 +34,7 @@ struct vfsmount
34 int mnt_expiry_mark; /* true if marked for expiry */ 34 int mnt_expiry_mark; /* true if marked for expiry */
35 char *mnt_devname; /* Name of device e.g. /dev/dsk/hda1 */ 35 char *mnt_devname; /* Name of device e.g. /dev/dsk/hda1 */
36 struct list_head mnt_list; 36 struct list_head mnt_list;
37 struct list_head mnt_fslink; /* link in fs-specific expiry list */ 37 struct list_head mnt_expire; /* link in fs-specific expiry list */
38 struct namespace *mnt_namespace; /* containing namespace */ 38 struct namespace *mnt_namespace; /* containing namespace */
39}; 39};
40 40