> In message <20080403023239.GY9785@xxxxxxxxxxxxxxxxxx>, Al Viro writes: > > On Wed, Apr 02, 2008 at 10:21:24PM -0400, Erez Zadok wrote: > > > Yes, I do grab both vfsmount and superblock refs. I found out that grabbing > > > vfsmount refs wasn't enough to prevent "umount -l" from detaching the f/s on > > > which I'm stacked on. So now at mount time (or branch management time), I > > > grab those super-refs, as I have them after a successful path_lookup. And, > > > since I keep a list of the branches I'm stacked on, I know precisely which > > > superblocks' references I need to release when unionfs is unmounted. > > > > How the devil would holding a superblock prevent umount -l? > > It doesn't prevent umount -l; but it prevents the lower superblock from > being kfree()d if there were no references left to it, so I don't try to > accessed freed memory (and get 6b6b6b6b oopses :-) Having a ref on the vfsmount should be enough, regardless of whether the mount is attached or not. There's nothing special about a detached mount, that anything outside namespace.c should care about. Miklos -- 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