Date: Fri, 3 Apr 2009 16:35:21 +0400 From: Chagin Dmitry <dchagin@freebsd.org> To: Kostik Belousov <kostikbel@gmail.com> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Peter Wemm <peter@freebsd.org> Subject: Re: svn commit: r190655 - head/sys/kern Message-ID: <20090403123521.GA58369@dchagin.static.corbina.ru> In-Reply-To: <20090403094432.GQ31897@deviant.kiev.zoral.com.ua> References: <200904022116.n32LGK81076210@svn.freebsd.org> <20090403060553.GA20624@dchagin.static.corbina.ru> <20090403094432.GQ31897@deviant.kiev.zoral.com.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
--mYCpIKhGyMATD0i+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 03, 2009 at 12:44:32PM +0300, Kostik Belousov wrote: > On Fri, Apr 03, 2009 at 10:05:53AM +0400, Chagin Dmitry wrote: > > On Thu, Apr 02, 2009 at 09:16:20PM +0000, Peter Wemm wrote: > > > Author: peter > > > Date: Thu Apr 2 21:16:20 2009 > > > New Revision: 190655 > > > URL: http://svn.freebsd.org/changeset/base/190655 > > >=20 > > > Log: > > > vn_vptocnp() unlocks the name cache and forgets to re-lock it before > > > returning in one error case, and mistakenly unlocks it for the > > > umount -f case. > > >=20 > >=20 > > vn_vptocnp() consumers expects what in case of error returns > > w/o CACHE_RLOCK held. so you need something like: > Yeah, I do not quite understand this commit. >=20 > >=20 > > diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c > > index ea19e13..b06a6c6 100644 > > --- a/sys/kern/vfs_cache.c > > +++ b/sys/kern/vfs_cache.c > > @@ -971,18 +971,17 @@ vn_vptocnp(struct vnode **vp, char **bp, char *bu= f, u_int *buflen) > > vdrop(*vp); > > VFS_UNLOCK_GIANT(vfslocked); > > if (error) { > > - CACHE_RLOCK(); > > numfullpathfail2++; > > return (error); > > } > Yes, this is reversal of the part of the r190655. >=20 > > *bp =3D buf + *buflen; > > *vp =3D dvp; > > - CACHE_RLOCK(); > > if ((*vp)->v_iflag & VI_DOOMED) { > > /* forced unmount */ > > vdrop(*vp); > > return (ENOENT); > > } > > + CACHE_RLOCK(); > > vdrop(*vp); > > =20 > > return (0); > There, r190655 should be reversed too, instead of doing what you do. > VI_DOOMED should be checked while cache is locked. >=20 whoops, it was fast hacking, therefore make universe panicked after rebase to r190655 thnx :) --=20 Have fun! chd --mYCpIKhGyMATD0i+ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.10 (FreeBSD) iEYEARECAAYFAknWAogACgkQ0t2Tb3OO/O05IgCgnUd8Cnvi9gqx7RsdwRfovr23 Tm8AnRCSAZ66N0EMHac5VXt9VH02LTzC =uySt -----END PGP SIGNATURE----- --mYCpIKhGyMATD0i+--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090403123521.GA58369>