From e43de33f20aaa1f4308153c3cf7ce7c1f2a669cb Mon Sep 17 00:00:00 2001 From: Andrey Vagin Date: Wed, 10 Sep 2014 16:46:41 +0400 Subject: [PATCH] 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: Andrey Vagin Signed-off-by: Pavel Emelyanov --- mount.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mount.c b/mount.c index 9bb8a1744..495673de1 100644 --- a/mount.c +++ b/mount.c @@ -377,10 +377,9 @@ static int validate_mounts(struct mount_info *info, bool for_dump) /* root mount can be any */ continue; - if (m->parent->shared_id) { + if (m->parent->shared_id && !list_empty(&m->parent->mnt_share)) { 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); list_for_each_entry(ct, &t->children, siblings) {