Date: Mon, 2 Jul 2007 15:10:38 +0200 From: Roman Divacky <rdivacky@freebsd.org> To: John Baldwin <jhb@freebsd.org> Cc: Perforce Change Reviews <perforce@freebsd.org> Subject: Re: PERFORCE change 122480 for review Message-ID: <20070702131038.GA31701@freebsd.org> In-Reply-To: <200706292052.06861.jhb@freebsd.org> References: <200706281214.l5SCEhFq046327@repoman.freebsd.org> <200706292052.06861.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070702131038.GA31701>