If the buffer is not in the queue, do nothing.
Change-Id: Icdb95775bcc6d010ca1926ce4384d9edcd8f1cd3
Reviewed-on: http://gerrit.openafs.org/6351
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
{
lock_AssertWrite(&buf_globalLock);
+ if (!(bufp->qFlags & CM_BUF_QREDIR))
+ return;
+
lock_ObtainMutex(&scp->redirMx);
_InterlockedAnd(&bufp->qFlags, ~CM_BUF_QREDIR);
buf_MoveToHeadOfRedirQueue(cm_scache_t *scp, cm_buf_t *bufp)
{
lock_AssertWrite(&buf_globalLock);
- osi_assertx(bufp->qFlags & CM_BUF_QREDIR,
- "buf_MoveToHeadOfRedirQueue buffer not held by redirector");
+ if (!(bufp->qFlags & CM_BUF_QREDIR))
+ return;
lock_ObtainMutex(&scp->redirMx);