[CRIU] [PATCH 2/3] criu: files-reg -- Create a complete path to deleted dentry
Cyrill Gorcunov
gorcunov at openvz.org
Fri Nov 18 06:51:23 PST 2016
In case if several levels of dentries are missed we can't
restore them otherwise.
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
criu/files-reg.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/criu/files-reg.c b/criu/files-reg.c
index 1c3d32e0cbf7..650f314617b1 100644
--- a/criu/files-reg.c
+++ b/criu/files-reg.c
@@ -197,10 +197,8 @@ again:
if ((ret = mknod(path, gfe->mode, gfe->rdev)) < 0)
msg = "Can't create node for ghost dev";
} else if (S_ISDIR(gfe->mode)) {
- if ((ret = mkdir(path, gfe->mode)) < 0) {
- pr_perror("Can't make ghost dir");
- goto err;
- }
+ if ((ret = mkdirpat(AT_FDCWD, path, gfe->mode)) < 0)
+ msg = "Can't make ghost dir";
} else {
if ((ret = mkreg_ghost(path, gfe->mode, gf, img)) < 0)
msg = "Can't create ghost regfile";
--
2.7.4
More information about the CRIU
mailing list