diff --git a/fs/namespace.c b/fs/namespace.c index 4dfe7e23b7ee..e8d61d5f581d 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -1763,7 +1763,7 @@ void dissolve_on_fput(struct vfsmount *mnt) { namespace_lock(); lock_mount_hash(); - if (!real_mount(mnt)->mnt_ns) { + if (!real_mount(mnt)->mnt_ns && !(mnt->mnt_flags & MNT_UMOUNT)) { mntget(mnt); umount_tree(real_mount(mnt), UMOUNT_CONNECTED); } @@ -2469,7 +2469,7 @@ static int do_move_mount(struct path *old_path, struct path *new_path) if (old->mnt_ns && !attached) goto out1; - if (old->mnt.mnt_flags & MNT_LOCKED) + if (old->mnt.mnt_flags & (MNT_LOCKED | MNT_UMOUNT)) goto out1; if (old_path->dentry != old_path->mnt->mnt_root)