Date: Wed, 25 May 2011 21:17:53 +0000 (UTC) From: Rick Macklem <rmacklem@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r222291 - head/sys/fs/nfsclient Message-ID: <201105252117.p4PLHrvE030666@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rmacklem Date: Wed May 25 21:17:53 2011 New Revision: 222291 URL: http://svn.freebsd.org/changeset/base/222291 Log: Add some missing mutex locking to the new NFS client. MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clvnops.c Modified: head/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvnops.c Wed May 25 21:04:11 2011 (r222290) +++ head/sys/fs/nfsclient/nfs_clvnops.c Wed May 25 21:17:53 2011 (r222291) @@ -2470,10 +2470,12 @@ ncl_commit(struct vnode *vp, u_quad_t of error = nfsrpc_commit(vp, offset, cnt, cred, td, verf, &nfsva, &attrflag, NULL); if (!error) { + mtx_lock(&nmp->nm_mtx); if (NFSBCMP((caddr_t)nmp->nm_verf, verf, NFSX_VERF)) { NFSBCOPY(verf, (caddr_t)nmp->nm_verf, NFSX_VERF); error = NFSERR_STALEWRITEVERF; } + mtx_unlock(&nmp->nm_mtx); if (!error && attrflag) (void) nfscl_loadattrcache(&vp, &nfsva, NULL, NULL, 0, 1);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105252117.p4PLHrvE030666>