[CRIU] [PATCH v5 13/15] mount: copy private field to "bind mount" mount_info structure

Pavel Emelyanov xemul at virtuozzo.com
Wed Jan 27 06:36:38 PST 2016


On 01/27/2016 03:04 PM, Stanislav Kinsburskiy wrote:
> Mount private field can be initialized on actual mount operation, and then
> used later with a bind-mount.
> Thus, if have to be copied.
> 
> Signed-off-by: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
> ---
>  mount.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/mount.c b/mount.c
> index 53518d8..58f1329 100644
> --- a/mount.c
> +++ b/mount.c
> @@ -2323,6 +2323,8 @@ static int do_bind_mount(struct mount_info *mi)
>  	master = mi->master_id && mi->master_id == mi->bind->master_id;
>  	cut_root = cut_root_for_bind(mi->root, mi->bind->root);

Add code comment here saying why this is required.

> +	mi->private = mi->bind->private;
> +
>  	if (list_empty(&mi->bind->children))
>  		mnt_path = mi->bind->mountpoint;
>  	else {
> 
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu
> .
> 



More information about the CRIU mailing list