lock_ObtainMutex(&bufp->mx);
lock_ObtainMutex(&scp->mx);
cm_SyncOpDone(scp, bufp, flags);
- lock_ReleaseMutex(&scp->mx);
/* turn off writing and wakeup users */
if (isStore) {
bufp->flags &= ~(CM_BUF_WRITING | CM_BUF_DIRTY);
}
+ lock_ReleaseMutex(&scp->mx);
lock_ReleaseMutex(&bufp->mx);
buf_Release(bufp);
}