Windows: buf_DirtyBuffersExist uses fileHashp not allp list pointer
authorJeffrey Altman <jaltman@secure-endpoints.com>
Sun, 15 Nov 2009 05:11:24 +0000 (00:11 -0500)
committerJeffrey Altman <jaltman|account-1000011@unknown>
Thu, 19 Nov 2009 16:54:18 +0000 (08:54 -0800)
buf_DirtyBuffersExist() should use the fileHashp pointer and not
the allp list pointer in order to walk the hash table list.

LICENSE MIT

Change-Id: Ie043647cbeec479abe0d96b3b5405130f2ba1aac
Reviewed-on: http://gerrit.openafs.org/828
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

src/WINNT/afsd/cm_buf.c

index 6010f43..acfde34 100644 (file)
@@ -2000,7 +2000,7 @@ long buf_DirtyBuffersExist(cm_fid_t *fidp)
 
     i = BUF_FILEHASH(fidp);
 
-    for (bp = cm_data.buf_fileHashTablepp[i]; bp; bp=bp->allp, bcount++) {
+    for (bp = cm_data.buf_fileHashTablepp[i]; bp; bp=bp->fileHashp, bcount++) {
        if (!cm_FidCmp(fidp, &bp->fid) && (bp->flags & CM_BUF_DIRTY))
            return 1;
     }