2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-30 13:58:34 +00:00

mount: Umount a mountpoint when iterating

The tree should already be sorted, thus the call for umount shouldn't fail.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Pavel Emelyanov 2012-06-27 20:57:38 +04:00
parent f0c68e7361
commit 1adb7d2416

View File

@ -8,6 +8,7 @@
#include <sys/stat.h>
#include <string.h>
#include <stdlib.h>
#include <sys/mount.h>
#include "crtools.h"
#include "types.h"
@ -334,7 +335,12 @@ static int do_umount_one(struct mount_info *mi)
if (!mi->parent)
return 0;
pr_debug("\tUmounting %s\n", mi->mountpoint);
if (umount(mi->mountpoint)) {
pr_perror("Can't umount at %s", mi->mountpoint);
return -1;
}
pr_info("Umounted at %s\n", mi->mountpoint);
return 0;
}