[CRIU] [PATCH 2/2] mount: handle a case when parent and child mounts in the same directory

Pavel Emelyanov xemul at virtuozzo.com
Thu May 5 05:24:23 PDT 2016


On 05/05/2016 05:22 AM, Andrey Vagin wrote:
> From: Andrew Vagin <avagin at virtuozzo.com>

Some better than empty comment is welcome.

> Signed-off-by: Andrew Vagin <avagin at virtuozzo.com>
> ---
>  criu/mount.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/criu/mount.c b/criu/mount.c
> index a3c830f..6bfb152 100644
> --- a/criu/mount.c
> +++ b/criu/mount.c
> @@ -634,6 +634,9 @@ static int validate_shared(struct mount_info *m)
>  
>  		ct_mpnt_rpath = ct->mountpoint + t_mpnt_l; /* path from t->mountpoint to ct->mountpoint */
>  
> +		if (ct_mpnt_rpath[0] == 0)
> +			m_root_rpath++; /* skip the first "/" */
> +
>  		/*
>  		 * Check whether ct can be is visible at m, i.e. the
>  		 * ct's rpath starts (as path) with m's rpath.
> 



More information about the CRIU mailing list