diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/namespace.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/fs/namespace.c b/fs/namespace.c index e669a3bf86e7..010d5bebcb7e 100644 --- a/fs/namespace.c +++ b/fs/namespace.c | |||
@@ -822,6 +822,16 @@ static void detach_mnt(struct mount *mnt, struct path *old_path) | |||
822 | /* | 822 | /* |
823 | * vfsmount lock must be held for write | 823 | * vfsmount lock must be held for write |
824 | */ | 824 | */ |
825 | static void umount_mnt(struct mount *mnt) | ||
826 | { | ||
827 | /* old mountpoint will be dropped when we can do that */ | ||
828 | mnt->mnt_ex_mountpoint = mnt->mnt_mountpoint; | ||
829 | unhash_mnt(mnt); | ||
830 | } | ||
831 | |||
832 | /* | ||
833 | * vfsmount lock must be held for write | ||
834 | */ | ||
825 | void mnt_set_mountpoint(struct mount *mnt, | 835 | void mnt_set_mountpoint(struct mount *mnt, |
826 | struct mountpoint *mp, | 836 | struct mountpoint *mp, |
827 | struct mount *child_mnt) | 837 | struct mount *child_mnt) |
@@ -1371,9 +1381,7 @@ static void umount_tree(struct mount *mnt, enum umount_tree_flags how) | |||
1371 | pin_insert_group(&p->mnt_umount, &p->mnt_parent->mnt, &unmounted); | 1381 | pin_insert_group(&p->mnt_umount, &p->mnt_parent->mnt, &unmounted); |
1372 | if (mnt_has_parent(p)) { | 1382 | if (mnt_has_parent(p)) { |
1373 | mnt_add_count(p->mnt_parent, -1); | 1383 | mnt_add_count(p->mnt_parent, -1); |
1374 | /* old mountpoint will be dropped when we can do that */ | 1384 | umount_mnt(p); |
1375 | p->mnt_ex_mountpoint = p->mnt_mountpoint; | ||
1376 | unhash_mnt(p); | ||
1377 | } | 1385 | } |
1378 | change_mnt_propagation(p, MS_PRIVATE); | 1386 | change_mnt_propagation(p, MS_PRIVATE); |
1379 | } | 1387 | } |