summaryrefslogtreecommitdiffstats
path: root/sys/vm/swap_pager.c
diff options
context:
space:
mode:
authormckusick <mckusick@FreeBSD.org>1999-06-26 02:47:16 +0000
committermckusick <mckusick@FreeBSD.org>1999-06-26 02:47:16 +0000
commit5b58f2f951911f1075788268f99efccf1dba60eb (patch)
tree3f01ed42f71231eaa6a8cfa08b267634f1923fb1 /sys/vm/swap_pager.c
parent3213b13650cb2206bbd62b5b1764d148750f63a0 (diff)
downloadFreeBSD-src-5b58f2f951911f1075788268f99efccf1dba60eb.zip
FreeBSD-src-5b58f2f951911f1075788268f99efccf1dba60eb.tar.gz
Convert buffer locking from using the B_BUSY and B_WANTED flags to using
lockmgr locks. This commit should be functionally equivalent to the old semantics. That is, all buffer locking is done with LK_EXCLUSIVE requests. Changes to take advantage of LK_SHARED and LK_RECURSIVE will be done in future commits.
Diffstat (limited to 'sys/vm/swap_pager.c')
-rw-r--r--sys/vm/swap_pager.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c
index 2651be4..74ca75e 100644
--- a/sys/vm/swap_pager.c
+++ b/sys/vm/swap_pager.c
@@ -64,7 +64,7 @@
*
* @(#)swap_pager.c 8.9 (Berkeley) 3/21/94
*
- * $Id: swap_pager.c,v 1.117 1999/03/14 09:20:00 julian Exp $
+ * $Id: swap_pager.c,v 1.118 1999/05/06 20:00:33 phk Exp $
*/
#include <sys/param.h>
@@ -1108,7 +1108,7 @@ swap_pager_getpages(object, m, count, reqpage)
pmap_qenter(kva, m + i, j - i);
- bp->b_flags = B_BUSY | B_READ | B_CALL;
+ bp->b_flags = B_READ | B_CALL;
bp->b_iodone = swp_pager_async_iodone;
bp->b_rcred = bp->b_wcred = proc0.p_ucred;
bp->b_data = (caddr_t) kva;
@@ -1358,10 +1358,10 @@ swap_pager_putpages(object, m, count, sync, rtvals)
if (sync == TRUE) {
bp = getpbuf(&nsw_wcount_sync);
- bp->b_flags = B_BUSY | B_CALL;
+ bp->b_flags = B_CALL;
} else {
bp = getpbuf(&nsw_wcount_async);
- bp->b_flags = B_BUSY | B_CALL | B_ASYNC;
+ bp->b_flags = B_CALL | B_ASYNC;
}
bp->b_spc = NULL; /* not used, but NULL-out anyway */
@@ -1413,6 +1413,7 @@ swap_pager_putpages(object, m, count, sync, rtvals)
if (sync == FALSE) {
bp->b_iodone = swp_pager_async_iodone;
+ BUF_KERNPROC(bp);
VOP_STRATEGY(bp->b_vp, bp);
for (j = 0; j < n; ++j)
OpenPOWER on IntegriCloud