diff options
| author | thorpej <thorpej@NetBSD.org> | 2003-02-25 20:35:31 +0000 |
|---|---|---|
| committer | thorpej <thorpej@NetBSD.org> | 2003-02-25 20:35:31 +0000 |
| commit | eb14e866760f574eec4780202b889ac3bbc49d89 (patch) | |
| tree | 7314d0576ed195cf1d15bb6231040e383da37f78 /sys/dev/ata | |
| parent | cc005c66dbc79b15c3eb81d26efb64aa8cefbf9c (diff) | |
Add a new BUF_INIT() macro which initializes b_dep and b_interlock, and
use it. This fixes a few places where either b_dep or b_interlock were
not properly initialized.
Diffstat (limited to 'sys/dev/ata')
| -rw-r--r-- | sys/dev/ata/ata_raid.c | 5 | ||||
| -rw-r--r-- | sys/dev/ata/ld_ataraid.c | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/sys/dev/ata/ata_raid.c b/sys/dev/ata/ata_raid.c index d9ba4896f3b..e13cfe93899 100644 --- a/sys/dev/ata/ata_raid.c +++ b/sys/dev/ata/ata_raid.c @@ -1,4 +1,4 @@ -/* $NetBSD: ata_raid.c,v 1.2 2003/02/05 21:38:40 pk Exp $ */ +/* $NetBSD: ata_raid.c,v 1.3 2003/02/25 20:35:35 thorpej Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -296,8 +296,7 @@ ata_raid_config_block_rw(struct vnode *vp, daddr_t blkno, void *buf, int error; bp = pool_get(&bufpool, PR_WAITOK); - simple_lock_init(&bp->b_interlock); - LIST_INIT(&bp->b_dep); + BUF_INIT(bp); bp->b_vp = vp; bp->b_dev = vp->v_rdev; diff --git a/sys/dev/ata/ld_ataraid.c b/sys/dev/ata/ld_ataraid.c index 2b77c1e15e8..0673f2e27dd 100644 --- a/sys/dev/ata/ld_ataraid.c +++ b/sys/dev/ata/ld_ataraid.c @@ -1,4 +1,4 @@ -/* $NetBSD: ld_ataraid.c,v 1.3 2003/01/29 16:50:37 thorpej Exp $ */ +/* $NetBSD: ld_ataraid.c,v 1.4 2003/02/25 20:35:35 thorpej Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -231,6 +231,7 @@ ld_ataraid_make_cbuf(struct ld_ataraid_softc *sc, struct buf *bp, cbp = CBUF_GET(); if (cbp == NULL) return (NULL); + BUF_INIT(&cbp->cb_buf); cbp->cb_buf.b_flags = bp->b_flags | B_CALL; cbp->cb_buf.b_iodone = sc->sc_iodone; cbp->cb_buf.b_proc = bp->b_proc; @@ -238,7 +239,6 @@ ld_ataraid_make_cbuf(struct ld_ataraid_softc *sc, struct buf *bp, cbp->cb_buf.b_dev = sc->sc_vnodes[comp]->v_rdev; cbp->cb_buf.b_blkno = bn + sc->sc_aai->aai_offset; cbp->cb_buf.b_data = addr; - LIST_INIT(&cbp->cb_buf.b_dep); cbp->cb_buf.b_bcount = bcount; /* Context for iodone */ |
