* [PATCH 3/4] pre/post_restore_task: Do not pass checkpoint context when unused
@ 2009-10-14 0:53 Matt Helsley
[not found] ` <1255481585-32625-3-git-send-email-matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Matt Helsley @ 2009-10-14 0:53 UTC (permalink / raw)
To: Oren Laadan; +Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA
The checkpoint context is not used in these functions -- they only rely
on current -- so it's safe to remove.
Signed-off-by: Matt Helsley <matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
---
checkpoint/process.c | 4 ++--
checkpoint/restart.c | 10 +++++-----
include/linux/checkpoint.h | 4 ++--
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/checkpoint/process.c b/checkpoint/process.c
index 17c08e8..4008529 100644
--- a/checkpoint/process.c
+++ b/checkpoint/process.c
@@ -815,7 +815,7 @@ static int restore_task_pgid(struct ckpt_ctx *ctx)
}
/* prepare the task for restore */
-int pre_restore_task(struct ckpt_ctx *ctx)
+int pre_restore_task(void)
{
sigset_t sigset;
@@ -844,7 +844,7 @@ int pre_restore_task(struct ckpt_ctx *ctx)
return 0;
}
-void post_restore_task(struct ckpt_ctx *ctx)
+void post_restore_task(void)
{
/* can happen if restart failed early */
if (!current->checkpoint_data)
diff --git a/checkpoint/restart.c b/checkpoint/restart.c
index fc94374..6679472 100644
--- a/checkpoint/restart.c
+++ b/checkpoint/restart.c
@@ -945,7 +945,7 @@ static int do_restore_task(void)
restore_debug_running(ctx);
- ret = pre_restore_task(ctx);
+ ret = pre_restore_task();
if (ret < 0)
goto out;
@@ -967,7 +967,7 @@ static int do_restore_task(void)
*/
if (zombie) {
restore_debug_exit(ctx);
- post_restore_task(ctx);
+ post_restore_task();
ckpt_ctx_put(ctx);
do_exit(current->exit_code);
}
@@ -979,7 +979,7 @@ static int do_restore_task(void)
if (ret < 0)
restore_notify_error(ctx, ret);
- post_restore_task(ctx);
+ post_restore_task();
current->flags &= ~PF_RESTARTING;
clear_task_ctx(current);
ckpt_ctx_put(ctx);
@@ -1196,7 +1196,7 @@ static int do_restore_coord(struct ckpt_ctx *ctx, pid_t pid)
*/
if (ctx->uflags & RESTART_TASKSELF) {
- ret = pre_restore_task(ctx);
+ ret = pre_restore_task();
ckpt_debug("pre restore task: %d\n", ret);
if (ret < 0)
goto out;
@@ -1233,7 +1233,7 @@ static int do_restore_coord(struct ckpt_ctx *ctx, pid_t pid)
}
out:
if (ctx->uflags & RESTART_TASKSELF)
- post_restore_task(ctx);
+ post_restore_task();
restore_debug_error(ctx, ret);
if (ret < 0) {
diff --git a/include/linux/checkpoint.h b/include/linux/checkpoint.h
index dd75bc2..4b61378 100644
--- a/include/linux/checkpoint.h
+++ b/include/linux/checkpoint.h
@@ -154,8 +154,8 @@ extern int ckpt_activate_next(struct ckpt_ctx *ctx);
extern int ckpt_collect_task(struct ckpt_ctx *ctx, struct task_struct *t);
extern int checkpoint_task(struct ckpt_ctx *ctx, struct task_struct *t);
extern int restore_task(struct ckpt_ctx *ctx);
-extern int pre_restore_task(struct ckpt_ctx *ctx);
-extern void post_restore_task(struct ckpt_ctx *ctx);
+extern int pre_restore_task(void);
+extern void post_restore_task(void);
/* arch hooks */
extern int checkpoint_write_header_arch(struct ckpt_ctx *ctx);
--
1.5.6.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-10-14 22:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-14 0:53 [PATCH 3/4] pre/post_restore_task: Do not pass checkpoint context when unused Matt Helsley
[not found] ` <1255481585-32625-3-git-send-email-matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-10-14 22:34 ` Oren Laadan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.