svn commit: r184851 - user/dfr/gssapi/6/sys/nfsserver
Doug Rabson
dfr at FreeBSD.org
Tue Nov 11 07:51:46 PST 2008
Author: dfr
Date: Tue Nov 11 15:51:45 2008
New Revision: 184851
URL: http://svn.freebsd.org/changeset/base/184851
Log:
Fix locking.
Modified:
user/dfr/gssapi/6/sys/nfsserver/nfs_srvkrpc.c
Modified: user/dfr/gssapi/6/sys/nfsserver/nfs_srvkrpc.c
==============================================================================
--- user/dfr/gssapi/6/sys/nfsserver/nfs_srvkrpc.c Tue Nov 11 14:58:07 2008 (r184850)
+++ user/dfr/gssapi/6/sys/nfsserver/nfs_srvkrpc.c Tue Nov 11 15:51:45 2008 (r184851)
@@ -227,10 +227,14 @@ nfs_rephead(int siz, struct nfsrv_descri
if (err == EBADRPC)
return (NULL);
+ /* XXXRW: not 100% clear the lock is needed here. */
+ NFSD_LOCK_ASSERT();
+
nd->nd_repstat = err;
if (err && (nd->nd_flag & ND_NFSV3) == 0) /* XXX recheck */
siz = 0;
+ NFSD_UNLOCK();
MGET(mreq, M_WAIT, MT_DATA);
/*
@@ -241,6 +245,7 @@ nfs_rephead(int siz, struct nfsrv_descri
MCLGET(mreq, M_WAIT);
}
mb = mreq;
+ NFSD_LOCK();
bpos = mtod(mb, caddr_t);
if (err != NFSERR_RETVOID) {
@@ -371,7 +376,9 @@ nfssvc_program(struct svc_req *rqst, SVC
}
nfsrvstats.srvrpccnt[nd.nd_procnum]++;
+ NFSD_LOCK();
error = proc(&nd, NULL, curthread, &mrep);
+ NFSD_UNLOCK();
if (nd.nd_cr)
crfree(nd.nd_cr);
More information about the svn-src-user
mailing list