[CRIU] [PATCH 3/3] mnt: Reshuffle MntEntries reading code
Pavel Emelyanov
xemul at parallels.com
Fri Sep 18 02:17:46 PDT 2015
Signed-off-by: Pavel Emelyanov <xemul at parallels.com>
---
mount.c | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/mount.c b/mount.c
index 945cd1c..145f1e4 100644
--- a/mount.c
+++ b/mount.c
@@ -2446,17 +2446,19 @@ static int collect_mnt_from_image(struct mount_info **pms, struct ns_id *nsid)
pm->need_plugin = me->with_plugin;
pm->deleted = me->deleted;
pm->is_ns_root = is_root(me->mountpoint);
+ if (me->has_internal_sharing)
+ pm->internal_sharing = me->internal_sharing;
- pr_debug("\t\tGetting source for %d\n", pm->mnt_id);
pm->source = xstrdup(me->source);
if (!pm->source)
goto err;
- if (me->has_internal_sharing)
- pm->internal_sharing = me->internal_sharing;
+ pm->options = xstrdup(me->options);
+ if (!pm->options)
+ goto err;
/* FIXME: abort unsupported early */
- pm->fstype = decode_fstype(me->fstype, me->fsname);
+ pm->fstype = decode_fstype(me->fstype, me->fsname);
if (get_mp_root(me, pm))
goto err;
@@ -2464,11 +2466,6 @@ static int collect_mnt_from_image(struct mount_info **pms, struct ns_id *nsid)
if (get_mp_mountpoint(me, pm, root, root_len))
goto err;
- pr_debug("\t\tGetting opts for %d\n", pm->mnt_id);
- pm->options = xstrdup(me->options);
- if (!pm->options)
- goto err;
-
pr_debug("\tRead %d mp @ %s\n", pm->mnt_id, pm->mountpoint);
}
--
1.9.3
More information about the CRIU
mailing list