[CRIU] [PATCH] mnt: add support for external shared mounts

Pavel Emelyanov xemul at parallels.com
Fri Apr 3 07:43:48 PDT 2015


>>> @@ -1475,17 +1508,19 @@ static int do_new_mount(struct mount_info *mi)
>>>  		return -1;
>>>  
>>>  	if (mount(src, mi->mountpoint, tp->name,
>>> -			mi->flags & (~MS_SHARED), mi->options) < 0) {
>>> +			mi->flags & ~(MS_SLAVE | MS_SHARED), mi->options) < 0) {
>>
>> What if mountpoint is not slave? Doesn't this hunk break the existing restore?
> 
> If the mount point is not a slave I think this hunk should have no
> effect (here we're just masking off the bits to restore MS_SLAVE
> later). Without masking of MS_SLAVE, mount(2) was giving me an error
> (EINVAL, I think).

Oh, sure! Sorry for confusion, it's the ~(...) :\

> The rest of the changes are good, I will make them and re-send once we
> resolve this.

Thanks :)

-- Pavel


More information about the CRIU mailing list