From 5af5d78d1338b0c4709985e75d6a36132d6c2ac5 Mon Sep 17 00:00:00 2001 From: Kenneth R Westerback Date: Sat, 16 Apr 2011 03:21:17 +0000 Subject: Use 'CLR(->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@. --- sys/arch/vax/vax/disksubr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sys/arch/vax') diff --git a/sys/arch/vax/vax/disksubr.c b/sys/arch/vax/vax/disksubr.c index 4c8245cb677..2d90272813c 100644 --- a/sys/arch/vax/vax/disksubr.c +++ b/sys/arch/vax/vax/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.64 2011/04/15 14:57:29 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.65 2011/04/16 03:21:15 krw Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1999/06/30 18:48:06 ragge Exp $ */ /* @@ -77,7 +77,7 @@ readdisklabel(dev_t dev, void (*strat)(struct buf *), bp->b_blkno = 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)) { @@ -127,7 +127,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 = 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) @@ -135,7 +135,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); -- cgit v1.2.3