From 2ac8b1608936d008605baed356c150d86e9470f8 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sat, 5 Apr 2003 21:01:16 +0000 Subject: [PATCH] Remove GIANT_REQUIRED from getpbuf(). Reviewed by: tegge Reduce pbuf_mtx's scope in relpbuf(). Submitted by: tegge --- sys/vm/vm_pager.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/vm/vm_pager.c b/sys/vm/vm_pager.c index 342c98a20873..46bdd411bee9 100644 --- a/sys/vm/vm_pager.c +++ b/sys/vm/vm_pager.c @@ -371,7 +371,6 @@ getpbuf(pfreecnt) struct buf *bp; s = splvm(); - GIANT_REQUIRED; mtx_lock(&pbuf_mtx); for (;;) { @@ -445,7 +444,6 @@ relpbuf(bp, pfreecnt) int s; s = splvm(); - mtx_lock(&pbuf_mtx); if (bp->b_rcred != NOCRED) { crfree(bp->b_rcred); @@ -461,6 +459,7 @@ relpbuf(bp, pfreecnt) BUF_UNLOCK(bp); + mtx_lock(&pbuf_mtx); TAILQ_INSERT_HEAD(&bswlist, bp, b_freelist); if (bswneeded) {