lkml.org 
[lkml]   [2008]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [patch 01/10] vfs: add path_create() and path_mknod()
From
Date
> In message <20080403023239.GY9785@ZenIV.linux.org.uk>, 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


\
 
 \ /
  Last update: 2008-04-04 13:07    [W:0.108 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site