Skip to content
Commit e54d0d26 authored by Pavel Tikhomirov's avatar Pavel Tikhomirov Committed by Andrei Vagin
Browse files

mount: fix regression where open_mountpoint failed on readonly fs

If we fail to create temporary directory for doing a clean mount we can
make mount clean reusing the code which enters new mountns to umount
overmounts. As when last process exits mntns all mounts are implicitly
cleaned from children, see in kernel source - sys_exit->do_exit
->exit_task_namespaces->switch_task_namespaces->free_nsproxy
->put_mnt_ns->umount_tree->drop_collected_mounts->umount_tree:

    /* Hide the mounts from mnt_mounts */
    list_for_each_entry(p, &tmp_list, mnt_list) {
            list_del_init(&p->mnt_child);
    }

Fixes commit b6cfb1ce2948 ("mount: make open_mountpoint handle overmouts
properly")

https://github.com/checkpoint-restore/criu/issues/520


Signed-off-by: default avatarPavel Tikhomirov <ptikhomirov@virtuozzo.com>
Acked-by: default avatarAdrian Reber <areber@redhat.com>
Signed-off-by: default avatarAndrei Vagin <avagin@virtuozzo.com>
parent 382756a4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment