[CRIU] [PATCH] restore: don't restore cg props if task restore fails

Andrew Vagin avagin at parallels.com
Thu Aug 28 05:42:11 PDT 2014


On Wed, Aug 27, 2014 at 10:57:49PM +0000, Tycho Andersen wrote:
> Once the task restore has failed, we can just abort, no need to restore the cg
> props.
>

Acked-by: Andrew Vagin <avagin at parallels.com>

> Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
> ---
>  cr-restore.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/cr-restore.c b/cr-restore.c
> index 7bb5cef..cefa78e 100644
> --- a/cr-restore.c
> +++ b/cr-restore.c
> @@ -1821,11 +1821,11 @@ int cr_restore_tasks(void)
>  	if (criu_signals_setup() < 0)
>  		goto err;
>  
> -	ret = restore_root_task(root_item);
> -
> -	if (prepare_cgroup_properties() < 0)
> +	if (restore_root_task(root_item) < 0)
>  		goto err;
>  
> +	ret = prepare_cgroup_properties();
> +
>  err:
>  	fini_cgroup();
>  	cr_plugin_fini();
> -- 
> 1.9.1
> 
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu


More information about the CRIU mailing list