summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2003-12-08 22:19:58 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2003-12-08 22:19:58 +0000
commit05f5bc3d541eecbb38b53211ceb4121a1bfbeef3 (patch)
treedc5ac0238d106cabed5564dfa79ea3a7ca02e8f3 /sys
parent5a043444db11ef3b49b8a0a1dc20336747d537e5 (diff)
remove unneeded uvmfault_unlockmaps; form netbsd via Julien Bordet <zejames@greyhats.org>; tedu@ ok
Diffstat (limited to 'sys')
-rw-r--r--sys/uvm/uvm_loan.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/sys/uvm/uvm_loan.c b/sys/uvm/uvm_loan.c
index e81496b066b..ee950523dca 100644
--- a/sys/uvm/uvm_loan.c
+++ b/sys/uvm/uvm_loan.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_loan.c,v 1.19 2002/03/14 01:27:18 millert Exp $ */
+/* $OpenBSD: uvm_loan.c,v 1.20 2003/12/08 22:19:57 mickey Exp $ */
/* $NetBSD: uvm_loan.c,v 1.22 2000/06/27 17:29:25 mrg Exp $ */
/*
@@ -266,19 +266,24 @@ uvm_loan(map, start, len, result, flags)
goto fail;
/*
- * now do the loanout
+ * map now locked. now do the loanout...
*/
rv = uvm_loanentry(&ufi, &output, flags);
if (rv < 0)
goto fail;
/*
- * done! advance pointers and unlock.
+ * done! the map is unlocked. advance, if possible.
+ *
+ * XXXCDC: could be recoded to hold the map lock with
+ * smarter code (but it only happens on map entry
+ * boundaries, so it isn't that bad).
*/
- rv <<= PAGE_SHIFT;
- len -= rv;
- start += rv;
- uvmfault_unlockmaps(&ufi, FALSE);
+ if (rv) {
+ rv <<= PAGE_SHIFT;
+ len -= rv;
+ start += rv;
+ }
}
/*