Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Jul 2017 20:01:31 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r321580 - head/sys/fs/nfsclient
Message-ID:  <201707262001.v6QK1VOI062069@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201707262001.v6QK1VOI062069>