]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
DEVEL15-windows-scache-clean-bufs-20080224
authorJeffrey Altman <jaltman@secure-endpoints.com>
Sun, 24 Feb 2008 15:35:34 +0000 (15:35 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Sun, 24 Feb 2008 15:35:34 +0000 (15:35 +0000)
LICENSE MIT

In MergeStatus, only remove clean buffers from the hash table.

(cherry picked from commit f52c6e1bc020a0985d2bc168d06b2c87fe7a2797)

src/WINNT/afsd/cm_scache.c

index e4f73568fbabbf5a199fe7df45431ece41ba6c03..953d88f0dacc80220d583d61ae648a0caa886e9d 100644 (file)
@@ -1688,7 +1688,8 @@ void cm_MergeStatus(cm_scache_t *dscp,
              */
             if (cm_FidCmp(&scp->fid, &bp->fid) == 0 &&
                  lock_TryMutex(&bp->mx)) {
-                if (bp->refCount == 0) {
+                if (bp->refCount == 0 && 
+                    !(bp->flags & CM_BUF_READING | CM_BUF_WRITING | CM_BUF_DIRTY)) {
                     prevBp = bp->fileHashBackp;
                     bp->fileHashBackp = bp->fileHashp = NULL;
                     if (prevBp)