Date: Sun, 23 Mar 1997 18:53:16 +1100 From: Bruce Evans <bde@zeta.org.au> To: freebsd-bugs@freefall.freebsd.org, peter@spinner.DIALix.COM Subject: Re: kern/3064: nfs server link() handler panics with non-recursive lock reentry Message-ID: <199703230753.SAA29091@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
> > >Fix: > > > > Not known.. I don't understand vnode locking under lite2 well enough. > > It seems the panic is happening within VOP_LINK(), so nfsrv_link() doesn't > appear to be setting up the locking properly when the target file exists. It seems to be a simple merge error. You understand merges? :-) The args are reversed, and exclusive locking of the directory arg is normal. I'm still confused about the ordering. nfssrv_link() uses non-Lite2 order for NetBSD and FreeBSD; nfs_link() uses non-Lite2 order for NetBSD. One of the NetBSD cases is probably wrong. CSRG reversed the order in Lite2. I thought that we reversed it too. VOP_LINK.9 seems to agree with our actual order (tdvp first). Bruce diff -c2 nfs_serv.c~ nfs_serv.c *** nfs_serv.c~ Mon Feb 24 00:40:43 1997 --- nfs_serv.c Sun Mar 23 18:32:53 1997 *************** *** 2028,2032 **** nqsrv_getl(vp, ND_WRITE); nqsrv_getl(xp, ND_WRITE); ! error = VOP_LINK(vp, nd.ni_dvp, &nd.ni_cnd); } else { VOP_ABORTOP(nd.ni_dvp, &nd.ni_cnd); --- 2026,2034 ---- nqsrv_getl(vp, ND_WRITE); nqsrv_getl(xp, ND_WRITE); ! #if defined(__NetBSD__) || defined(__FreeBSD__) ! error = VOP_LINK(nd.ni_dvp, vp, &nd.ni_cnd); ! #else ! error = VOP_LINK(vp, nd.ni_dvp, &nd.ni_cnd); ! #endif } else { VOP_ABORTOP(nd.ni_dvp, &nd.ni_cnd);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199703230753.SAA29091>