Commit cb738520 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

mount: don't skip checks in validate_mounts()

"continue" is called by mistake, so we skip a few checks for shared
mounts without siblings.
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 53957fad
...@@ -377,10 +377,9 @@ static int validate_mounts(struct mount_info *info, bool for_dump) ...@@ -377,10 +377,9 @@ static int validate_mounts(struct mount_info *info, bool for_dump)
/* root mount can be any */ /* root mount can be any */
continue; continue;
if (m->parent->shared_id) { if (m->parent->shared_id && !list_empty(&m->parent->mnt_share)) {
struct mount_info *ct; struct mount_info *ct;
if (list_empty(&m->parent->mnt_share))
continue;
t = list_first_entry(&m->parent->mnt_share, struct mount_info, mnt_share); t = list_first_entry(&m->parent->mnt_share, struct mount_info, mnt_share);
list_for_each_entry(ct, &t->children, siblings) { list_for_each_entry(ct, &t->children, siblings) {
......
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