LCACHE_LOCK(flags); /* disable+lock */
- bp->l_flag |= lbmDONE;
-
if (bio->bi_status) {
bp->l_flag |= lbmERROR;
if (bp->l_flag & lbmREAD) {
bp->l_flag &= ~lbmREAD;
- LCACHE_UNLOCK(flags); /* unlock+enable */
-
/* wakeup I/O initiator */
LCACHE_WAKEUP(&bp->l_ioevent);
- return;
+ goto out;
}
/*
if (bp->l_flag & lbmDIRECT) {
LCACHE_WAKEUP(&bp->l_ioevent);
- LCACHE_UNLOCK(flags);
- return;
+ goto out;
}
tail = log->wqueue;
* leave buffer for i/o initiator to dispose
*/
if (bp->l_flag & lbmSYNC) {
- LCACHE_UNLOCK(flags); /* unlock+enable */
-
/* wakeup I/O initiator */
LCACHE_WAKEUP(&bp->l_ioevent);
}
else if (bp->l_flag & lbmGC) {
LCACHE_UNLOCK(flags);
lmPostGC(bp);
+ LCACHE_LOCK(flags); /* disable+lock */
}
/*
assert(bp->l_flag & lbmRELEASE);
assert(bp->l_flag & lbmFREE);
lbmfree(bp);
-
- LCACHE_UNLOCK(flags); /* unlock+enable */
}
+
+out:
+ bp->l_flag |= lbmDONE;
+ LCACHE_UNLOCK(flags);
}
int jfsIOWait(void *arg)