Linux Container Development
 help / color / mirror / Atom feed
From: Oren Laadan <orenl-RdfvBDnrOixBDgjK7y7TUQ@public.gmane.org>
To: Matt Helsley <matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Subject: Re: [PATCH 3/4] pre/post_restore_task: Do not pass checkpoint context when unused
Date: Wed, 14 Oct 2009 18:34:15 -0400	[thread overview]
Message-ID: <4AD651E7.4020800@librato.com> (raw)
In-Reply-To: <1255481585-32625-3-git-send-email-matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>


Pulled.

Matt Helsley wrote:
> 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);

      parent reply	other threads:[~2009-10-14 22:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4AD651E7.4020800@librato.com \
    --to=orenl-rdfvbdnroixbdgjk7y7tuq@public.gmane.org \
    --cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox