if (bufp) {
lock_ObtainMutex(&bufp->mx);
_InterlockedAnd(&bufp->cmFlags, ~CM_BUF_CMSTORING);
- bufp->flags &= ~CM_BUF_DIRTY;
+ _InterlockedAnd(&bufp->flags, ~CM_BUF_DIRTY);
bufp->dirty_offset = 0;
bufp->dirty_length = 0;
- bufp->flags |= CM_BUF_ERROR;
+ _InterlockedOr(&bufp->flags, CM_BUF_ERROR);
bufp->error = VNOVNODE;
bufp->dataVersion = CM_BUF_VERSION_BAD; /* bad */
bufp->dirtyCounter++;
if (bufp) {
lock_ObtainMutex(&bufp->mx);
_InterlockedAnd(&bufp->cmFlags, ~CM_BUF_CMFETCHING);
- bufp->flags &= ~CM_BUF_DIRTY;
+ _InterlockedAnd(&bufp->flags, ~CM_BUF_DIRTY);
bufp->dirty_offset = 0;
bufp->dirty_length = 0;
- bufp->flags |= CM_BUF_ERROR;
+ _InterlockedOr(&bufp->flags, CM_BUF_ERROR);
bufp->error = VNOVNODE;
bufp->dataVersion = CM_BUF_VERSION_BAD; /* bad */
bufp->dirtyCounter++;
*lbpp = bp->hashp; /* hash out */
bp->hashp = NULL;
- bp->qFlags &= ~CM_BUF_QINHASH;
+ _InterlockedAnd(&bp->qFlags, ~CM_BUF_QINHASH);
}
lock_ReleaseMutex(&bp->mx);
}