From: Jeffrey Altman Date: Thu, 1 Sep 2011 13:51:06 +0000 (-0400) Subject: Windows: buf_SetDirty do nothing if length is zero X-Git-Tag: upstream/1.6.1.pre1^2~122 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=02d3c98d74e49385c7ef26245e05739fe6c47df7;p=packages%2Fo%2Fopenafs.git Windows: buf_SetDirty do nothing if length is zero Reviewed-on: http://gerrit.openafs.org/5358 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7dcc4766377b99c60db60328c21a3990db132268) Change-Id: I30dc0f218df56e6e38fe6ce3736a5450b7036e51 Reviewed-on: http://gerrit.openafs.org/6024 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman --- diff --git a/src/WINNT/afsd/cm_buf.c b/src/WINNT/afsd/cm_buf.c index eca1ecf8d..21523227a 100644 --- a/src/WINNT/afsd/cm_buf.c +++ b/src/WINNT/afsd/cm_buf.c @@ -1348,6 +1348,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);