2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 14:25:49 +00:00

mount: stop doing anything if populate_mnt_ns() failed

Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Andrew Vagin
2015-12-08 19:02:00 +03:00
committed by Pavel Emelyanov
parent 96a12d4755
commit 7094e110a3

View File

@@ -3161,6 +3161,8 @@ int prepare_mnt_ns(void)
ret = populate_mnt_ns();
if (!ret && opts.root)
ret = cr_pivot_root(NULL);
if (ret)
return -1;
rst = open_proc(PROC_SELF, "ns/mnt");
if (rst < 0)
@@ -3207,7 +3209,7 @@ int prepare_mnt_ns(void)
return ret;
err:
if (rst)
if (rst >= 0)
restore_ns(rst, &mnt_ns_desc);
return -1;
}