summaryrefslogtreecommitdiff
path: root/sys/uvm/uvm_loan.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/uvm/uvm_loan.c')
-rw-r--r--sys/uvm/uvm_loan.c26
1 files changed, 6 insertions, 20 deletions
diff --git a/sys/uvm/uvm_loan.c b/sys/uvm/uvm_loan.c
index 989d0bb2867..b4f62568fd7 100644
--- a/sys/uvm/uvm_loan.c
+++ b/sys/uvm/uvm_loan.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_loan.c,v 1.30 2009/05/08 13:50:15 ariane Exp $ */
+/* $OpenBSD: uvm_loan.c,v 1.31 2009/06/01 19:54:02 oga Exp $ */
/* $NetBSD: uvm_loan.c,v 1.22 2000/06/27 17:29:25 mrg Exp $ */
/*
@@ -462,14 +462,12 @@ uvm_loanuobj(struct uvm_faultinfo *ufi, void ***output, int flags, vaddr_t va)
simple_lock(&uobj->vmobjlock);
/*
- * verify that the page has not be released and re-verify
- * that amap slot is still free. if there is a problem we
- * drop our lock (thus force a lookup refresh/retry).
+ * Re-verify that amap slot is still free. if there is a
+ * problem we drop our lock (thus force a lookup refresh/retry).
*/
- if ((pg->pg_flags & PG_RELEASED) != 0 ||
- (locked && amap && amap_lookup(&ufi->entry->aref,
- ufi->orig_rvaddr - ufi->entry->start))) {
+ if (locked && amap && amap_lookup(&ufi->entry->aref,
+ ufi->orig_rvaddr - ufi->entry->start)) {
if (locked)
uvmfault_unlockall(ufi, amap, NULL, NULL);
@@ -486,17 +484,6 @@ uvm_loanuobj(struct uvm_faultinfo *ufi, void ***output, int flags, vaddr_t va)
/* still holding object lock */
wakeup(pg);
- if (pg->pg_flags & PG_RELEASED) {
-#ifdef DIAGNOSTIC
- if (uobj->pgops->pgo_releasepg == NULL)
- panic("uvm_loanuobj: object has no releasepg function");
-#endif
- /* frees page */
- if (uobj->pgops->pgo_releasepg(pg, NULL))
- simple_unlock(&uobj->vmobjlock);
- return (0);
- }
-
uvm_lock_pageq();
uvm_pageactivate(pg); /* make sure it is in queues */
uvm_unlock_pageq();
@@ -509,8 +496,7 @@ uvm_loanuobj(struct uvm_faultinfo *ufi, void ***output, int flags, vaddr_t va)
/*
* at this point we have the page we want ("pg") marked PG_BUSY for us
- * and we have all data structures locked. do the loanout. page can
- * not be PG_RELEASED (we caught this above).
+ * and we have all data structures locked. do the loanout.
*/
if ((flags & UVM_LOAN_TOANON) == 0) { /* loan to wired-kernel page? */