summaryrefslogtreecommitdiffstats
path: root/sys/isa/fd.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/isa/fd.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/isa/fd.c')
-rw-r--r--sys/isa/fd.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/isa/fd.c b/sys/isa/fd.c
index 77ebb36..36e5524 100644
--- a/sys/isa/fd.c
+++ b/sys/isa/fd.c
@@ -47,7 +47,7 @@
* SUCH DAMAGE.
*
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
- * $Id: fd.c,v 1.145 1999/05/30 16:52:12 phk Exp $
+ * $Id: fd.c,v 1.146 1999/05/31 18:39:16 dfr Exp $
*
*/
@@ -2196,7 +2196,9 @@ fdformat(dev, finfo, p)
*/
PHOLD(p);
bzero((void *)bp, sizeof(struct buf));
- bp->b_flags = B_BUSY | B_PHYS | B_FORMAT;
+ BUF_LOCKINIT(bp);
+ BUF_LOCK(bp, LK_EXCLUSIVE);
+ bp->b_flags = B_PHYS | B_FORMAT;
/*
* calculate a fake blkno, so fdstrategy() would initiate a
@@ -2232,6 +2234,8 @@ fdformat(dev, finfo, p)
* allow the process to be swapped
*/
PRELE(p);
+ BUF_UNLOCK(bp);
+ BUF_LOCKFREE(bp);
free(bp, M_TEMP);
return rv;
}
OpenPOWER on IntegriCloud