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/520Signed-off-by:Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Acked-by:
Adrian Reber <areber@redhat.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
Showing
Please
register
or
sign in
to comment