[Devel] [PATCH 4/7] files.c: ckpt_err() during restore

serue at us.ibm.com serue at us.ibm.com
Thu Nov 5 16:00:16 PST 2009


From: Serge E. Hallyn <serue at us.ibm.com>

Signed-off-by: Serge E. Hallyn <serue at us.ibm.com>
---
 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
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list