mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-02 15:25:21 +00:00
mount: Do not fail on shared cr-time mounts mismatch
Since cr-time mount parent may be shared, and we do not propagate the mount there, this patch excludes them from validation. Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
172f3e1908
commit
714bd7a03f
@@ -587,7 +587,7 @@ static int validate_shared(struct mount_info *m)
|
|||||||
list_for_each_entry(ct, &t->children, siblings) {
|
list_for_each_entry(ct, &t->children, siblings) {
|
||||||
struct mount_info *cm;
|
struct mount_info *cm;
|
||||||
|
|
||||||
if (ct->is_ns_root)
|
if (ct->is_ns_root || ct->mnt_id == CRTIME_MNT_ID)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
sibling_path = mnt_get_sibling_path(ct, m, buf, sizeof(buf));
|
sibling_path = mnt_get_sibling_path(ct, m, buf, sizeof(buf));
|
||||||
@@ -605,8 +605,11 @@ static int validate_shared(struct mount_info *m)
|
|||||||
list_move(&cm->siblings, &children);
|
list_move(&cm->siblings, &children);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!list_empty(&m->children))
|
/* Now all real mounts should be moved */
|
||||||
goto err;
|
list_for_each_entry(ct, &m->children, siblings) {
|
||||||
|
if (ct->mnt_id != CRTIME_MNT_ID)
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
|
|
||||||
list_splice(&children, &m->children);
|
list_splice(&children, &m->children);
|
||||||
return 0;
|
return 0;
|
||||||
|
Reference in New Issue
Block a user