Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Aug 2017 08:03:40 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r321909 - stable/11/sys/fs/nfsclient
Message-ID:  <201708020803.v7283enl006186@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Wed Aug  2 08:03:40 2017
New Revision: 321909
URL: https://svnweb.freebsd.org/changeset/base/321909

Log:
  MFC r321580:
  Move rtvals initialization out of the region protected by NFS node lock.

Modified:
  stable/11/sys/fs/nfsclient/nfs_clbio.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/fs/nfsclient/nfs_clbio.c
==============================================================================
--- stable/11/sys/fs/nfsclient/nfs_clbio.c	Wed Aug  2 07:58:36 2017	(r321908)
+++ stable/11/sys/fs/nfsclient/nfs_clbio.c	Wed Aug  2 08:03:40 2017	(r321909)
@@ -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;
 
 	PCPU_INC(cnt.v_vnodeout);
 	PCPU_ADD(cnt.v_vnodepgsout, count);



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