Windows: buf_SetDirty add assertion
authorJeffrey Altman <jaltman@your-file-system.com>
Sat, 17 Nov 2012 22:11:42 +0000 (17:11 -0500)
committerJeffrey Altman <jaltman@your-file-system.com>
Fri, 23 Nov 2012 15:45:18 +0000 (07:45 -0800)
the userp parameter must never be NULL.

Change-Id: Id785ac417bc869f708990f0bfe53809e3e5c71e5
Reviewed-on: http://gerrit.openafs.org/8472
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

src/WINNT/afsd/cm_buf.c

index 96b5a70..1b8ccec 100644 (file)
@@ -1685,6 +1685,7 @@ void buf_SetDirty(cm_buf_t *bp, cm_req_t *reqp, afs_uint32 offset, afs_uint32 le
 {
     osi_assertx(bp->magic == CM_BUF_MAGIC, "invalid cm_buf_t magic");
     osi_assertx(bp->refCount > 0, "cm_buf_t refcount 0");
+    osi_assertx(userp != NULL, "userp is NULL");
 
     if (length == 0)
         return;