/*
* Copyright (c) 2008, 2009, 2010, 2011 Kernel Drivers, LLC.
- * Copyright (c) 2009, 2010, 2011 Your File System, Inc.
+ * Copyright (c) 2009, 2010, 2011, 2012, 2013 Your File System, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright
- * notice,
- * this list of conditions and the following disclaimer in the
- * documentation
- * and/or other materials provided with the distribution.
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
* - Neither the names of Kernel Drivers, LLC and Your File System, Inc.
* nor the names of their contributors may be used to endorse or promote
* products derived from this software without specific prior written
DWORD ntStatus = STATUS_SUCCESS;
ULONGLONG ullIndex;
AFSObjectInfoCB *pObjectInfo = NULL;
+ LONG lCount;
if ( AFSIsEqualFID( &VolumeCB->ObjectInformation.FileId, FileId))
{
if ( NT_SUCCESS( ntStatus)) {
- AFSObjectInfoIncrement( pObjectInfo,
- AFS_OBJECT_REFERENCE_FIND);
+ lCount = AFSObjectInfoIncrement( pObjectInfo,
+ AFS_OBJECT_REFERENCE_FIND);
+
+ AFSDbgTrace(( AFS_SUBSYSTEM_OBJECT_REF_COUNTING,
+ AFS_TRACE_LEVEL_VERBOSE,
+ "AFSFindObjectInfo Decrement count on object %p Cnt %d\n",
+ pObjectInfo,
+ lCount));
}
return pObjectInfo;
void
AFSReleaseObjectInfo( IN AFSObjectInfoCB **ppObjectInfo)
{
+ LONG lCount;
- AFSObjectInfoDecrement( *ppObjectInfo,
- AFS_OBJECT_REFERENCE_FIND);
+ lCount = AFSObjectInfoDecrement( *ppObjectInfo,
+ AFS_OBJECT_REFERENCE_FIND);
+
+ AFSDbgTrace(( AFS_SUBSYSTEM_OBJECT_REF_COUNTING,
+ AFS_TRACE_LEVEL_VERBOSE,
+ "AFSReleaseObjectInfo Decrement count on object %p Cnt %d\n",
+ *ppObjectInfo,
+ lCount));
*ppObjectInfo = NULL;
}
lCount = AFSObjectInfoDecrement( AFSGlobalDotDirEntry->ObjectInformation,
AFS_OBJECT_REFERENCE_GLOBAL);
+ AFSDbgTrace(( AFS_SUBSYSTEM_OBJECT_REF_COUNTING,
+ AFS_TRACE_LEVEL_VERBOSE,
+ "AFSCloseLibrary Decrement count on parent object %p Cnt %d\n",
+ AFSGlobalDotDirEntry->ObjectInformation,
+ lCount));
+
AFSDeleteObjectInfo( &AFSGlobalDotDirEntry->ObjectInformation);
ExDeleteResourceLite( &AFSGlobalDotDirEntry->NonPaged->Lock);
lCount = AFSObjectInfoDecrement( AFSGlobalDotDotDirEntry->ObjectInformation,
AFS_OBJECT_REFERENCE_GLOBAL);
+ AFSDbgTrace(( AFS_SUBSYSTEM_OBJECT_REF_COUNTING,
+ AFS_TRACE_LEVEL_VERBOSE,
+ "AFSCloseLibrary Decrement count on parent object %p Cnt %d\n",
+ AFSGlobalDotDotDirEntry->ObjectInformation,
+ lCount));
+
AFSDeleteObjectInfo( &AFSGlobalDotDotDirEntry->ObjectInformation);
ExDeleteResourceLite( &AFSGlobalDotDotDirEntry->NonPaged->Lock);
lCount = AFSObjectInfoDecrement( pDirNode->ObjectInformation,
AFS_OBJECT_REFERENCE_GLOBAL);
+ AFSDbgTrace(( AFS_SUBSYSTEM_OBJECT_REF_COUNTING,
+ AFS_TRACE_LEVEL_VERBOSE,
+ "AFSCloseLibrary Decrement count on parent object %p Cnt %d\n",
+ pDirNode->ObjectInformation,
+ lCount));
+
AFSDeleteObjectInfo( &pDirNode->ObjectInformation);
ExDeleteResourceLite( &pDirNode->NonPaged->Lock);