diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2011-04-16 03:21:17 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2011-04-16 03:21:17 +0000 |
commit | 5af5d78d1338b0c4709985e75d6a36132d6c2ac5 (patch) | |
tree | 06204a0001ec3bd364dcad84343781986e7366ec /sys/arch/hppa | |
parent | 4756385e9b648975c08e5d54adb8d4ac7ce047f2 (diff) |
Use 'CLR(<buf>->b_flags, B_READ | B_WRITE | B_DONE)' regardless of
what the previous IO was. Less chance of copy and paste errors.
Suggested by miod@.
Diffstat (limited to 'sys/arch/hppa')
-rw-r--r-- | sys/arch/hppa/hppa/disksubr.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/arch/hppa/hppa/disksubr.c b/sys/arch/hppa/hppa/disksubr.c index d8182be2974..950c30e50bc 100644 --- a/sys/arch/hppa/hppa/disksubr.c +++ b/sys/arch/hppa/hppa/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.79 2011/04/15 14:57:28 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.80 2011/04/16 03:21:15 krw Exp $ */ /* * Copyright (c) 1999 Michael Shalayeff @@ -104,7 +104,7 @@ readliflabel(struct buf *bp, void (*strat)(struct buf *), /* read LIF volume header */ bp->b_blkno = btodb(LIF_VOLSTART); bp->b_bcount = lp->d_secsize; - CLR(bp->b_flags, B_WRITE | B_DONE); + CLR(bp->b_flags, B_READ | B_WRITE | B_DONE); SET(bp->b_flags, B_BUSY | B_READ | B_RAW); (*strat)(bp); if (biowait(bp)) @@ -122,7 +122,7 @@ readliflabel(struct buf *bp, void (*strat)(struct buf *), /* read LIF directory */ dbp->b_blkno = lifstodb(lvp->vol_addr); dbp->b_bcount = lp->d_secsize; - CLR(dbp->b_flags, B_WRITE | B_DONE); + CLR(dbp->b_flags, B_READ | B_WRITE | B_DONE); SET(dbp->b_flags, B_BUSY | B_READ | B_RAW); (*strat)(dbp); if (biowait(dbp)) { @@ -155,7 +155,7 @@ readliflabel(struct buf *bp, void (*strat)(struct buf *), /* read LIF directory */ dbp->b_blkno = lifstodb(p->dir_addr); dbp->b_bcount = lp->d_secsize; - CLR(dbp->b_flags, B_WRITE | B_DONE); + CLR(dbp->b_flags, B_READ | B_WRITE | B_DONE); SET(dbp->b_flags, B_BUSY | B_READ | B_RAW); (*strat)(dbp); @@ -226,7 +226,7 @@ finished: bp->b_blkno = fsoff + LABELSECTOR; bp->b_bcount = lp->d_secsize; - CLR(bp->b_flags, B_WRITE | B_DONE); + CLR(bp->b_flags, B_READ | B_WRITE | B_DONE); SET(bp->b_flags, B_BUSY | B_READ | B_RAW); (*strat)(bp); if (biowait(bp)) { @@ -266,7 +266,7 @@ writedisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp) /* Read it in, slap the new label in, and write it back out */ bp->b_blkno = partoff + LABELSECTOR; bp->b_bcount = lp->d_secsize; - CLR(bp->b_flags, B_WRITE | B_DONE); + CLR(bp->b_flags, B_READ | B_WRITE | B_DONE); SET(bp->b_flags, B_BUSY | B_READ | B_RAW); (*strat)(bp); if ((error = biowait(bp)) != 0) @@ -274,7 +274,7 @@ writedisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp) dlp = (struct disklabel *)(bp->b_data + LABELOFFSET); *dlp = *lp; - CLR(bp->b_flags, B_READ | B_DONE); + CLR(bp->b_flags, B_READ | B_WRITE | B_DONE); SET(bp->b_flags, B_BUSY | B_WRITE | B_RAW); (*strat)(bp); error = biowait(bp); |