summaryrefslogtreecommitdiffstats
path: root/sys/kern/uipc_syscalls.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/uipc_syscalls.c')
-rw-r--r--sys/kern/uipc_syscalls.c29
1 files changed, 13 insertions, 16 deletions
diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c
index 6cc487a..1634681 100644
--- a/sys/kern/uipc_syscalls.c
+++ b/sys/kern/uipc_syscalls.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)uipc_syscalls.c 8.4 (Berkeley) 2/21/94
- * $Id: uipc_syscalls.c,v 1.48 1998/12/03 12:35:47 dg Exp $
+ * $Id: uipc_syscalls.c,v 1.49 1998/12/07 21:58:29 archie Exp $
*/
#include "opt_compat.h"
@@ -1543,7 +1543,13 @@ retry_lookup:
VM_WAIT;
goto retry_lookup;
}
- vm_page_flag_clear(pg, PG_BUSY);
+ /*
+ * don't just clear PG_BUSY manually -
+ * vm_page_alloc() should be considered opaque,
+ * use the VM routine provided to clear
+ * PG_BUSY.
+ */
+ vm_page_wakeup(pg);
}
/*
* Ensure that our page is still around when the I/O completes.
@@ -1583,21 +1589,12 @@ retry_lookup:
goto done;
}
} else {
- if ((pg->flags & PG_BUSY) || pg->busy) {
- s = splvm();
- if ((pg->flags & PG_BUSY) || pg->busy) {
- /*
- * Page is busy. Wait and retry.
- */
- vm_page_flag_set(pg, PG_WANTED);
- tsleep(pg, PVM, "sfpbsy", 0);
- splx(s);
- goto retry_lookup;
- }
- splx(s);
- }
+ if (vm_page_sleep_busy(pg, TRUE, "sfpbsy"))
+ goto retry_lookup;
+
/*
- * Protect from having the page ripped out from beneath us.
+ * Protect from having the page ripped out from
+ * beneath us.
*/
vm_page_wire(pg);
}
OpenPOWER on IntegriCloud