}
if (moving) {
- unhash_mnt(source_mnt);
+ umount_mnt(source_mnt);
mnt_notify_add(source_mnt);
} else {
if (source_mnt->mnt_ns) {
struct mount *p;
struct mount *old;
struct mount *parent;
- struct mountpoint *mp, *old_mp;
+ struct mountpoint *mp;
int err;
bool attached, beneath = flags & MNT_TREE_BENEATH;
p = real_mount(new_path->mnt);
parent = old->mnt_parent;
attached = mnt_has_parent(old);
- old_mp = old->mnt_mp;
ns = old->mnt_ns;
err = -EINVAL;
/* if the mount is moved, it should no longer be expire
* automatically */
list_del_init(&old->mnt_expire);
- if (attached)
- put_mountpoint(old_mp);
out:
unlock_mount(mp);
if (!err) {