Module Name:    src
Committed By:   hannken
Date:           Fri Jul  9 08:13:34 UTC 2010

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

Log Message:
Replace vget() with vref()/vn_lock(), this node already has a reference.


To generate a diff of this commit:
cvs rdiff -u -r1.151 -r1.152 src/sys/uvm/uvm_swap.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_swap.c
diff -u src/sys/uvm/uvm_swap.c:1.151 src/sys/uvm/uvm_swap.c:1.152
--- src/sys/uvm/uvm_swap.c:1.151	Thu Jun 24 13:03:20 2010
+++ src/sys/uvm/uvm_swap.c	Fri Jul  9 08:13:33 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_swap.c,v 1.151 2010/06/24 13:03:20 hannken Exp $	*/
+/*	$NetBSD: uvm_swap.c,v 1.152 2010/07/09 08:13:33 hannken Exp $	*/
 
 /*
  * Copyright (c) 1995, 1996, 1997, 2009 Matthew R. Green
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_swap.c,v 1.151 2010/06/24 13:03:20 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_swap.c,v 1.152 2010/07/09 08:13:33 hannken Exp $");
 
 #include "opt_uvmhist.h"
 #include "opt_compat_netbsd.h"
@@ -552,7 +552,9 @@
 	 */
 	if (SCARG(uap, arg) == NULL) {
 		vp = rootvp;		/* miniroot */
-		if (vget(vp, LK_EXCLUSIVE)) {
+		vref(vp);
+		if (vn_lock(vp, LK_EXCLUSIVE)) {
+			vrele(vp);
 			error = EBUSY;
 			goto out;
 		}

Reply via email to