On Tue, Feb 26, 2013 at 11:19:30PM -0800, Anatol Pomozov wrote: > Hi > > On Tue, Feb 26, 2013 at 10:56 PM, Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote: > > Simple: don't. This is fundamentally wrong thing to do. Not to mention > > anything else, there may be more than one namespace out there. This > > operation makes no sense. > > Yes I understand that there can be multiple namespaces. And I am fine > with unmounting only in the current namespace. It is actually how > libfuse currently implemented - it calls umount() on the mount point > path, so it leaves 1) bind mounts 2) mounts in other namespaces > untouched. > > Another ugly-but-working solution for fuse would be pass mountpoint > path as a mount option and store it to super_block. Then in > fuse_dev_release() call sys_umount(). Observe mount --move... There is no promise that it'll stay mounted where it used to be. BTW, what about somebody having cloned the entire namespace? Or spread the sucker via shared subtree stuff to another namespace, later remounted private, etc. "All places where the filesystem is mounted" is about as good a notion as "all pathnames of a file". Sorry. Besides, I _really_ doubt that it's a sane idea to start with; consider something like mount --bind empty_directory <something I really want overmounted and not accessible>. Having it suddenly exposed without your explicit action is not a good thing. As the matter of fact, something very similar had been outright NAKed by Linus and I agree with his arguments... -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html