Re: [RFC][PATCH] rbind across namespaces

Miklos Szeredi
2005-05-21T13:13:34Z

> Ok. look at the enclosed patch. Does it look any better? The special
> casing for detached mounts ate up some brain cells and made the code
> less simpler.

Yes, this isn't trivial stuff.

I realized one more thing: nd->mnt (the destination vfsmount) might be
detached while waiting for the semaphore. So that needs to be
rechecked after taking the semaphores.

And the same for old_nd->mnt in case of rbind. Though I'm
not sure what the semantics should be in this case:

1) rbind always fails if the source is detached

2) rbind always succeeds, and if the source is detached it just
copies that single mount

I like 2) better. Is there anything against it?

Miklos