Module Name:    src
Committed By:   ad
Date:           Sun Mar  8 18:40:30 UTC 2020

Modified Files:
        src/sys/uvm: uvm_readahead.c

Log Message:
Only need a read lock for uvm_pagelookup().


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/uvm/uvm_readahead.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/uvm/uvm_readahead.c
diff -u src/sys/uvm/uvm_readahead.c:1.11 src/sys/uvm/uvm_readahead.c:1.12
--- src/sys/uvm/uvm_readahead.c:1.11	Sun Feb 23 15:46:43 2020
+++ src/sys/uvm/uvm_readahead.c	Sun Mar  8 18:40:29 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_readahead.c,v 1.11 2020/02/23 15:46:43 ad Exp $	*/
+/*	$NetBSD: uvm_readahead.c,v 1.12 2020/03/08 18:40:29 ad Exp $	*/
 
 /*-
  * Copyright (c)2003, 2005, 2009 YAMAMOTO Takashi,
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_readahead.c,v 1.11 2020/02/23 15:46:43 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_readahead.c,v 1.12 2020/03/08 18:40:29 ad Exp $");
 
 #include <sys/param.h>
 #include <sys/pool.h>
@@ -133,7 +133,7 @@ ra_startio(struct uvm_object *uobj, off_
 	 * too. This speeds up I/O using cache, since it avoids lookups and temporary
 	 * allocations done by full pgo_get.
 	 */
-	rw_enter(uobj->vmobjlock, RW_WRITER);
+	rw_enter(uobj->vmobjlock, RW_READER);
 	struct vm_page *pg = uvm_pagelookup(uobj, trunc_page(endoff - 1));
 	rw_exit(uobj->vmobjlock);
 	if (pg != NULL) {

Reply via email to