[CRIU] [PATCH 3/3] mount: Do not set key to anything for auto-ext-mounts
Pavel Emelyanov
xemul at virtuozzo.com
Wed Sep 21 02:59:36 PDT 2016
Signed-off-by: Pavel Emelyanov <xemul at virtuozzo.com>
---
criu/mount.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/criu/mount.c b/criu/mount.c
index 40e871b..273c624 100644
--- a/criu/mount.c
+++ b/criu/mount.c
@@ -83,13 +83,17 @@ static struct ext_mount *ext_mount_lookup(char *key)
return NULL;
}
-static struct ext_mount *ext_mount_make_auto(char *key, char *val)
+static struct ext_mount *ext_mount_make_auto(char *val)
{
struct ext_mount *em;
em = xmalloc(sizeof(*em));
if (em) {
- em->key = key;
+ /*
+ * The key is (should) only be used for lookup by
+ * ext_mount_lookup() above.
+ */
+ em->key = (char *)0x00BEDA00;
em->val = val;
}
@@ -877,7 +881,7 @@ static int resolve_external_mounts(struct mount_info *info)
if (!p)
return -1;
- m->external = ext_mount_make_auto(p, AUTODETECTED_MOUNT);
+ m->external = ext_mount_make_auto(AUTODETECTED_MOUNT);
if (!m->external) {
free(p);
return -1;
@@ -3106,7 +3110,7 @@ static int get_mp_root(MntEntry *me, struct mount_info *mi)
* dump by resolve_external_mounts().
*/
- em = ext_mount_make_auto(AUTODETECTED_MOUNT, mi->source);
+ em = ext_mount_make_auto(mi->source);
if (!em)
return -1;
}
--
2.5.0
More information about the CRIU
mailing list