[CRIU] [PATCH CRIU 2/4] mount: do not make external mounts to be private if not needed

Tycho Andersen tycho.andersen at canonical.com
Wed Jan 20 09:47:41 PST 2016


On Wed, Jan 20, 2016 at 06:42:56PM +0300, Pavel Tikhomirov wrote:
> external mounts always have shared == master == 0

I don't understand the patch notes here; if external mounts always
have this, why is this patch needed? Isn't it a no-op?

> https://jira.sw.ru/browse/PSBM-42829
> Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
> ---
>  mount.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/mount.c b/mount.c
> index e267e10..424949a 100644
> --- a/mount.c
> +++ b/mount.c
> @@ -2392,7 +2392,8 @@ static int do_bind_mount(struct mount_info *mi)
>  	 * shared - the mount is in the same shared group with mi->bind
>  	 * mi->shared_id && !shared - create a new shared group
>  	 */
> -	if (restore_shared_options(mi, force_private_remount || (!shared && !master),
> +	if (restore_shared_options(mi, force_private_remount
> +					|| (!shared && !master && !mi->external),
>  					mi->shared_id && !shared,
>  					mi->master_id && !master))
>  		return -1;
> -- 
> 1.9.3
> 


More information about the CRIU mailing list