From: Serge E. Hallyn <[email protected]>

Signed-off-by: Serge E. Hallyn <[email protected]>
---
 checkpoint/files.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/checkpoint/files.c b/checkpoint/files.c
index 14ccfd6..9686b0b 100644
--- a/checkpoint/files.c
+++ b/checkpoint/files.c
@@ -649,6 +649,9 @@ static struct file *do_restore_file(struct ckpt_ctx *ctx)
        if (ops->restore)
                file = ops->restore(ctx, h);
  out:
+       if (IS_ERR(file))
+               ckpt_err(ctx, PTR_ERR(file), "file restore\n");
+
        ckpt_hdr_put(ctx, h);
        return file;
 }
@@ -738,8 +741,10 @@ static struct files_struct *do_restore_file_table(struct 
ckpt_ctx *ctx)
 
        /* point of no return -- close all file descriptors */
        ret = close_all_fds(current->files);
-       if (ret < 0)
+       if (ret < 0) {
+               ckpt_err(ctx, ret, "closing fds\n");
                goto out;
+       }
 
        for (i = 0; i < h->fdt_nfds; i++) {
                ret = restore_file_desc(ctx);
@@ -757,6 +762,7 @@ static struct files_struct *do_restore_file_table(struct 
ckpt_ctx *ctx)
                files = current->files;
                atomic_inc(&files->count);
        } else {
+               ckpt_err(ctx, ret, "restoring file table\n");
                files = ERR_PTR(ret);
        }
        return files;
-- 
1.6.1

_______________________________________________
Containers mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/containers

_______________________________________________
Devel mailing list
[email protected]
https://openvz.org/mailman/listinfo/devel

Reply via email to