]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Windows: do not bugcheck in AFSExAllocatePoolWithTag
authorJeffrey Altman <jaltman@your-file-system.com>
Thu, 23 Feb 2012 14:31:31 +0000 (06:31 -0800)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Fri, 24 Feb 2012 22:36:51 +0000 (14:36 -0800)
If the Bug Check flag is set, the call to AFSBreakPoint() in
AFSExAllocatePoolWithTag() will trigger.  There is no need for
an explicit bug check test in AFSExAllocatePoolWithTag().

If AFSExAllocatePoolWithTag() returns NULL there is no need
to ASSERT() the return value since AFSBreakPoint() would already
have been called to signal a debugger.

Change-Id: Ie8564f41f811c3afd99dc2e9c02f4aa68d63ef8e
Reviewed-on: http://gerrit.openafs.org/6780
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
src/WINNT/afsrdr/kernel/fs/AFSGeneric.cpp
src/WINNT/afsrdr/kernel/lib/AFSExtentsSupport.cpp

index 9150c66708df15716f10ca6ed5d892ba87e8fbed..d296e8b55d5b90a4b51b3aff44ba10ad97d14123 100644 (file)
@@ -1317,32 +1317,23 @@ AFSExAllocatePoolWithTag( IN POOL_TYPE  PoolType,
     if( pBuffer == NULL)
     {
 
-        if( BooleanFlagOn( AFSDebugFlags, AFS_DBG_BUGCHECK_EXCEPTION))
-        {
-
-            KeBugCheck( (ULONG)-2);
-        }
-        else
-        {
-
-            AFSDbgLogMsg( 0,
-                          0,
-                          "AFSExAllocatePoolWithTag failure Type %08lX Size %08lX Tag %08lX %08lX\n",
-                          PoolType,
-                          NumberOfBytes,
-                          Tag,
-                          PsGetCurrentThread());
+        AFSDbgLogMsg( 0,
+                      0,
+                      "AFSExAllocatePoolWithTag failure Type %08lX Size %08lX Tag %08lX %08lX\n",
+                      PoolType,
+                      NumberOfBytes,
+                      Tag,
+                      PsGetCurrentThread());
 
-            switch ( Tag ) {
+        switch ( Tag ) {
 
-            case AFS_GENERIC_MEMORY_21_TAG:
-            case AFS_GENERIC_MEMORY_22_TAG:
-                // AFSDumpTraceFiles -- do nothing;
-                break;
+        case AFS_GENERIC_MEMORY_21_TAG:
+        case AFS_GENERIC_MEMORY_22_TAG:
+            // AFSDumpTraceFiles -- do nothing;
+            break;
 
-            default:
-                AFSBreakPoint();
-            }
+        default:
+            AFSBreakPoint();
         }
     }
 
index f2b41c56b3530f57c4b64057e68cad7389cd73a1..94a2795343e840d2c69ebb0a9f4134e40c9712ce 100644 (file)
@@ -1014,8 +1014,6 @@ AFSProcessExtentsResult( IN AFSFcb *Fcb,
                 if (NULL  == pExtent)
                 {
 
-                    ASSERT( FALSE);
-
                     try_return (ntStatus = STATUS_INSUFFICIENT_RESOURCES );
                 }