[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <E1Jhjj3-0002i8-6W@pomaz-ex.szeredi.hu>
Date: Fri, 04 Apr 2008 13:04:53 +0200
From: Miklos Szeredi <miklos@...redi.hu>
To: ezk@...sunysb.edu
CC: viro@...iv.linux.org.uk, ezk@...sunysb.edu,
trond.myklebust@....uio.no, miklos@...redi.hu,
akpm@...ux-foundation.org, dave@...ux.vnet.ibm.com,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [patch 01/10] vfs: add path_create() and path_mknod()
> In message <20080403023239.GY9785@...IV.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists