From 7dcc4766377b99c60db60328c21a3990db132268 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Thu, 1 Sep 2011 09:51:06 -0400 Subject: [PATCH] Windows: buf_SetDirty do nothing if length is zero Change-Id: Id6a96feadccc437900e944ab23b45d2717766e1c Reviewed-on: http://gerrit.openafs.org/5358 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman --- src/WINNT/afsd/cm_buf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/WINNT/afsd/cm_buf.c b/src/WINNT/afsd/cm_buf.c index 5c633b3d8e..a08f3ec7a6 100644 --- a/src/WINNT/afsd/cm_buf.c +++ b/src/WINNT/afsd/cm_buf.c @@ -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);