mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 14:25:49 +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:
8
mount.c
8
mount.c
@@ -8,6 +8,7 @@
|
|||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <sys/mount.h>
|
||||||
|
|
||||||
#include "crtools.h"
|
#include "crtools.h"
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
@@ -334,7 +335,12 @@ static int do_umount_one(struct mount_info *mi)
|
|||||||
if (!mi->parent)
|
if (!mi->parent)
|
||||||
return 0;
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user