NULL,
NULL);
- pDirCB = pCcb->DirectoryCB;
-
//
// Remove the Ccb and de-allocate it
//
- ntStatus = AFSRemoveCcb( pFcb,
- pCcb);
-
- if( !NT_SUCCESS( ntStatus))
- {
-
- AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING,
- AFS_TRACE_LEVEL_WARNING,
- "AFSClose Failed to remove Ccb from Fcb Status %08lX\n", ntStatus);
-
- //
- // We can't actually fail a close operation so reset the status
- //
-
- ntStatus = STATUS_SUCCESS;
- }
-
- lCount = InterlockedDecrement( &pDirCB->DirOpenReferenceCount);
-
- AFSDbgLogMsg( AFS_SUBSYSTEM_DIRENTRY_REF_COUNTING,
- AFS_TRACE_LEVEL_VERBOSE,
- "AFSClose (IOCtl) Decrement count on %wZ DE %p Ccb %p Cnt %d\n",
- &pDirCB->NameInformation.FileName,
- pDirCB,
- pCcb,
- lCount);
-
- ASSERT( lCount >= 0);
+ AFSRemoveCcb( pFcb,
+ pCcb);
//
// If this is not the root then decrement the open child reference count
pCcb = (AFSCcb *)pIrpSp->FileObject->FsContext2;
- pDirCB = pCcb->DirectoryCB;
-
//
// Remove the Ccb and de-allocate it
//
- ntStatus = AFSRemoveCcb( pFcb,
- pCcb);
-
- if( !NT_SUCCESS( ntStatus))
- {
-
- AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING,
- AFS_TRACE_LEVEL_WARNING,
- "AFSClose Failed to remove Ccb from Fcb Status %08lX\n", ntStatus);
-
- //
- // We can't actually fail a close operation so reset the status
- //
-
- ntStatus = STATUS_SUCCESS;
- }
-
- lCount = InterlockedDecrement( &pDirCB->DirOpenReferenceCount);
-
- AFSDbgLogMsg( AFS_SUBSYSTEM_DIRENTRY_REF_COUNTING,
- AFS_TRACE_LEVEL_VERBOSE,
- "AFSClose Decrement (Root ALL) count on %wZ DE %p Ccb %p Cnt %d\n",
- &pDirCB->NameInformation.FileName,
- pDirCB,
- pCcb,
- lCount);
-
- ASSERT( lCount >= 0);
+ AFSRemoveCcb( pFcb,
+ pCcb);
AFSReleaseResource( &pFcb->NPFcb->Resource);
pDirCB = pCcb->DirectoryCB;
//
- // Remove the Ccb and de-allocate it
+ // Steal the DirOpenReferenceCount from the Ccb
//
- ntStatus = AFSRemoveCcb( pFcb,
- pCcb);
+ pCcb->DirectoryCB = NULL;
- if( !NT_SUCCESS( ntStatus))
- {
-
- AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING,
- AFS_TRACE_LEVEL_WARNING,
- "AFSClose Failed to remove Ccb from Fcb Status %08lX\n",
- ntStatus);
-
- //
- // We can't actually fail a close operation so reset the status
- //
+ //
+ // Remove the Ccb and de-allocate it
+ //
- ntStatus = STATUS_SUCCESS;
- }
+ AFSRemoveCcb( pFcb,
+ pCcb);
//
// If this entry is deleted then remove the object from the volume tree
NULL);
*/
- pDirCB = pCcb->DirectoryCB;
-
//
// Remove the Ccb and de-allocate it
//
- ntStatus = AFSRemoveCcb( pFcb,
- pCcb);
-
- if( !NT_SUCCESS( ntStatus))
- {
-
- AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING,
- AFS_TRACE_LEVEL_WARNING,
- "AFSClose Failed to remove Ccb from Fcb Status %08lX\n", ntStatus);
-
- //
- // We can't actually fail a close operation so reset the status
- //
-
- ntStatus = STATUS_SUCCESS;
- }
-
- lCount = InterlockedDecrement( &pDirCB->DirOpenReferenceCount);
-
- AFSDbgLogMsg( AFS_SUBSYSTEM_DIRENTRY_REF_COUNTING,
- AFS_TRACE_LEVEL_VERBOSE,
- "AFSClose (Share) Decrement count on %wZ DE %p Ccb %p Cnt %d\n",
- &pDirCB->NameInformation.FileName,
- pDirCB,
- pCcb,
- lCount);
-
- ASSERT( lCount >= 0);
+ AFSRemoveCcb( pFcb,
+ pCcb);
//
// If this is not the root then decrement the open child reference count