Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Jun 2011 01:28:46 +0000 (UTC)
From:      Rick Macklem <rmacklem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r222844 - stable/8/sys/fs/nfsclient
Message-ID:  <201106080128.p581SkYB008646@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rmacklem
Date: Wed Jun  8 01:28:46 2011
New Revision: 222844
URL: http://svn.freebsd.org/changeset/base/222844

Log:
  MFC: r222291
  Add some missing mutex locking to the new NFS client.

Modified:
  stable/8/sys/fs/nfsclient/nfs_clvnops.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/fs/nfsclient/nfs_clvnops.c
==============================================================================
--- stable/8/sys/fs/nfsclient/nfs_clvnops.c	Wed Jun  8 01:18:47 2011	(r222843)
+++ stable/8/sys/fs/nfsclient/nfs_clvnops.c	Wed Jun  8 01:28:46 2011	(r222844)
@@ -2460,10 +2460,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?201106080128.p581SkYB008646>