diff options
Diffstat (limited to 'fs/namespace.c')
-rw-r--r-- | fs/namespace.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/fs/namespace.c b/fs/namespace.c index 9d17541ebafa..ea555a36c314 100644 --- a/fs/namespace.c +++ b/fs/namespace.c | |||
@@ -880,24 +880,13 @@ void mark_mounts_for_expiry(struct list_head *mounts) | |||
880 | /* check that it is still dead: the count should now be 2 - as | 880 | /* check that it is still dead: the count should now be 2 - as |
881 | * contributed by the vfsmount parent and the mntget above */ | 881 | * contributed by the vfsmount parent and the mntget above */ |
882 | if (atomic_read(&mnt->mnt_count) == 2) { | 882 | if (atomic_read(&mnt->mnt_count) == 2) { |
883 | struct vfsmount *xdmnt; | 883 | struct nameidata old_nd; |
884 | struct dentry *xdentry; | ||
885 | 884 | ||
886 | /* delete from the namespace */ | 885 | /* delete from the namespace */ |
887 | list_del_init(&mnt->mnt_list); | 886 | list_del_init(&mnt->mnt_list); |
888 | list_del_init(&mnt->mnt_child); | 887 | detach_mnt(mnt, &old_nd); |
889 | list_del_init(&mnt->mnt_hash); | ||
890 | mnt->mnt_mountpoint->d_mounted--; | ||
891 | |||
892 | xdentry = mnt->mnt_mountpoint; | ||
893 | mnt->mnt_mountpoint = mnt->mnt_root; | ||
894 | xdmnt = mnt->mnt_parent; | ||
895 | mnt->mnt_parent = mnt; | ||
896 | |||
897 | spin_unlock(&vfsmount_lock); | 888 | spin_unlock(&vfsmount_lock); |
898 | 889 | path_release(&old_nd); | |
899 | mntput(xdmnt); | ||
900 | dput(xdentry); | ||
901 | 890 | ||
902 | /* now lay it to rest if this was the last ref on the | 891 | /* now lay it to rest if this was the last ref on the |
903 | * superblock */ | 892 | * superblock */ |