On Tue, Feb 26, 2013 at 10:35:12PM -0800, Anatol Pomozov wrote: > What I am trying to do is to iterate current filesystem namespace and > find mountpoints that correspond to super_block. Namespace can have > multiple corresponding mountpoints in case of bind mounts. Here is > code that seems to work fine http://pastebin.com/xLECPGa4 . Now I am > trying to understand what synchronization is required for this code. > It looks like access to nsproxy->mnt_ns->list should be done with > namespace_sem held. Unfortunately that semaphore is internal to > fs/namespace.c. It is not clear for me how I suppose to iterate the > mount list. > > Is there any advice/code example how to umount() mountpoints for a > given super_block? 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. Incidentally, anybody adding includes of fs/mount.h would better be ready to explain {What,Why}TF is being done. There's a damn good reason why this list is outside of public struct vfsmount... -- 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