Date: Fri, 13 Jul 2007 08:21:58 -0400 From: John Baldwin <jhb@freebsd.org> To: Roman Divacky <rdivacky@freebsd.org> Cc: Perforce Change Reviews <perforce@freebsd.org> Subject: Re: PERFORCE change 122480 for review Message-ID: <200707130822.00255.jhb@freebsd.org> In-Reply-To: <20070702131038.GA31701@freebsd.org> References: <200706281214.l5SCEhFq046327@repoman.freebsd.org> <200706292052.06861.jhb@freebsd.org> <20070702131038.GA31701@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Monday 02 July 2007 09:10:38 am Roman Divacky wrote: > On Fri, Jun 29, 2007 at 08:52:06PM -0400, John Baldwin wrote: > > On Thursday 28 June 2007 08:14:43 am Roman Divacky wrote: > > > http://perforce.freebsd.org/chv.cgi?CH=122480 > > > > > > Change 122480 by rdivacky@rdivacky_witten on 2007/06/28 12:14:14 > > > > > > vrele AFTER checking the vp for being on non-MPSAFE FS + some indentation > > > problems that caused bad scoping > > > > > > Noticed by: rwatson (again ;) ) > > > > Umm, no. You need Giant for the vrele(). The proper fix is to use the > > VFS_*_GIANT() macros and use int variables to know if you need to unlock > > Giant or not. > > I dont see an easy and elegant way how to use the VFS_*_GIANT macros. I lock > the giant in kern_get_at() function and unlock in function that calls this one. ie.: > > foo() > { > kern_get_at(...); > ... > if (VFS_NEEDSGIANT) > mtx_unlock(&Giant); > } > > I need to either propagate the vfslocked value from kern_get_at or lock the Giant in the foo() > function. honestly I dont like either much > > what do you suggest? I would lock Giant in foo() if you already have the vnode in foo(). -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200707130822.00255.jhb>