Windows: buf_SetDirty do nothing if length is zero
authorJeffrey Altman <jaltman@your-file-system.com>
Thu, 1 Sep 2011 13:51:06 +0000 (09:51 -0400)
committerJeffrey Altman <jaltman@openafs.org>
Sun, 4 Sep 2011 16:23:55 +0000 (09:23 -0700)
Change-Id: Id6a96feadccc437900e944ab23b45d2717766e1c
Reviewed-on: http://gerrit.openafs.org/5358
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

src/WINNT/afsd/cm_buf.c

index 5c633b3..a08f3ec 100644 (file)
@@ -1351,6 +1351,9 @@ void buf_SetDirty(cm_buf_t *bp, afs_uint32 offset, afs_uint32 length, cm_user_t
     osi_assertx(bp->magic == CM_BUF_MAGIC, "invalid cm_buf_t magic");
     osi_assertx(bp->refCount > 0, "cm_buf_t refcount 0");
 
+    if (length == 0)
+        return;
+
     if (bp->flags & CM_BUF_DIRTY) {
 
        osi_Log1(buf_logp, "buf_SetDirty 0x%p already dirty", bp);