Module Name:    src
Committed By:   rmind
Date:           Sun May 22 21:52:12 UTC 2011

Modified Files:
        src/sys/nfs [rmind-uvmplock]: nfs_node.c

Log Message:
nfs_gop_write: acquire the lock for pmap_page_protect() operation.


To generate a diff of this commit:
cvs rdiff -u -r1.110.4.4 -r1.110.4.5 src/sys/nfs/nfs_node.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/nfs/nfs_node.c
diff -u src/sys/nfs/nfs_node.c:1.110.4.4 src/sys/nfs/nfs_node.c:1.110.4.5
--- src/sys/nfs/nfs_node.c:1.110.4.4	Thu May 19 03:43:03 2011
+++ src/sys/nfs/nfs_node.c	Sun May 22 21:52:12 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: nfs_node.c,v 1.110.4.4 2011/05/19 03:43:03 rmind Exp $	*/
+/*	$NetBSD: nfs_node.c,v 1.110.4.5 2011/05/22 21:52:12 rmind Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nfs_node.c,v 1.110.4.4 2011/05/19 03:43:03 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nfs_node.c,v 1.110.4.5 2011/05/22 21:52:12 rmind Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_nfs.h"
@@ -346,9 +346,12 @@
 {
 	int i;
 
+	mutex_enter(vp->v_interlock);
 	for (i = 0; i < npages; i++) {
 		pmap_page_protect(pgs[i], VM_PROT_READ);
 	}
+	mutex_exit(vp->v_interlock);
+
 	return genfs_gop_write(vp, pgs, npages, flags);
 }
 

Reply via email to