Commit 714bd7a0 authored by Kirill Tkhai's avatar Kirill Tkhai Committed by Pavel Emelyanov

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: 's avatarKirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 172f3e19
...@@ -587,7 +587,7 @@ static int validate_shared(struct mount_info *m) ...@@ -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) ...@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment