[CRIU] [PATCH 1/3] mount: Move some checks in mounts_sb_equal
Pavel Emelyanov
xemul at virtuozzo.com
Wed Jan 11 00:32:21 PST 2017
Signed-off-by: Pavel Emelyanov <xemul at virtuozzo.com>
---
criu/mount.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/criu/mount.c b/criu/mount.c
index 4749f59..f356a01 100644
--- a/criu/mount.c
+++ b/criu/mount.c
@@ -294,6 +294,12 @@ static bool mounts_sb_equal(struct mount_info *a, struct mount_info *b)
if (a->fstype != b->fstype)
return false;
+ if (a->s_dev != b->s_dev)
+ return false;
+
+ if (strcmp(a->source, b->source) != 0)
+ return false;
+
/* There is a btrfs bug where it doesn't emit subvol= correctly when
* files are bind mounted, so let's ignore it for now.
* https://marc.info/?l=linux-btrfs&m=145857372803614&w=2
@@ -332,7 +338,7 @@ static bool mounts_sb_equal(struct mount_info *a, struct mount_info *b)
strcmp(a->private, b->private))
return false;
- return a->s_dev == b->s_dev && !strcmp(a->source, b->source);
+ return true;
}
/*
--
2.5.0
More information about the CRIU
mailing list