svn commit: r321580 - head/sys/fs/nfsclient

Konstantin Belousov kib at FreeBSD.org
Wed Jul 26 20:01:33 UTC 2017


Author: kib
Date: Wed Jul 26 20:01:31 2017
New Revision: 321580
URL: https://svnweb.freebsd.org/changeset/base/321580

Log:
  Move rtvals initialization out of the region protected by NFS node
  lock.
  
  Noted by:	alc
  Reviewed by:	alc, markj
  Tested by:	pho
  Sponsored by:	The FreeBSD Foundation
  MFC after:	1 week
  X-Differential revision:	https://reviews.freebsd.org/D11697

Modified:
  head/sys/fs/nfsclient/nfs_clbio.c

Modified: head/sys/fs/nfsclient/nfs_clbio.c
==============================================================================
--- head/sys/fs/nfsclient/nfs_clbio.c	Wed Jul 26 19:01:15 2017	(r321579)
+++ head/sys/fs/nfsclient/nfs_clbio.c	Wed Jul 26 20:01:31 2017	(r321580)
@@ -306,10 +306,6 @@ ncl_putpages(struct vop_putpages_args *ap)
 		printf("ncl_putpages: called on noncache-able vnode\n");
 		mtx_lock(&np->n_mtx);
 	}
-
-	for (i = 0; i < npages; i++)
-		rtvals[i] = VM_PAGER_ERROR;
-
 	/*
 	 * When putting pages, do not extend file past EOF.
 	 */
@@ -319,6 +315,9 @@ ncl_putpages(struct vop_putpages_args *ap)
 			count = 0;
 	}
 	mtx_unlock(&np->n_mtx);
+
+	for (i = 0; i < npages; i++)
+		rtvals[i] = VM_PAGER_ERROR;
 
 	VM_CNT_INC(v_vnodeout);
 	VM_CNT_ADD(v_vnodepgsout, count);


More information about the svn-src-all mailing list