For consistency use interlocked increment when setting the
cm_buf_t refCnt to 1 even though it is protected by a lock.
Change-Id: I91fbb1469715ee6b7d6f94f416c59ebcd1645336
Reviewed-on: http://gerrit.openafs.org/6175
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
buf_DecrementFreeCount();
/* prepare to return it. Give it a refcount */
- bp->refCount = 1;
+ InterlockedIncrement(&bp->refCount);
#ifdef DEBUG_REFCOUNT
osi_Log2(afsd_logp,"buf_GetNewLocked bp 0x%p ref %d", bp, 1);
afsi_log("%s:%d buf_GetNewLocked bp 0x%p, ref %d", __FILE__, __LINE__, bp, 1);