51#define BugCheckFileId (CDFS_BUG_CHECK_CLOSE)
91#pragma alloc_text(PAGE, CdFspClose)
92#pragma alloc_text(PAGE, CdCommonClose)
93#pragma alloc_text(PAGE, CdCommonClosePrivate)
94#pragma alloc_text(PAGE, CdQueueClose)
95#pragma alloc_text(PAGE, CdRemoveClose)
96#pragma alloc_text(PAGE, CdCloseWorker)
133 ULONG VcbHoldCount = 0;
180 IrpContext = &StackIrpContext;
195 UserReference = (
ULONG) IrpContext->ExceptionStatus;
241 if (PotentialVcbTeardown ||
243 (
Fcb->
Vcb != CurrentVcb)) {
245 if (CurrentVcb !=
NULL) {
250 if (PotentialVcbTeardown) {
264 if (!PotentialVcbTeardown) {
287 CdCommonClosePrivate( IrpContext, CurrentVcb,
Fcb, UserReference,
FALSE );
294 if (PotentialVcbTeardown) {
297 CdCheckForDismount( IrpContext, CurrentVcb,
FALSE );
302 PotentialVcbTeardown =
FALSE;
316 if (CurrentVcb !=
NULL) {
323#pragma prefast(suppress:26165, "Esp:1153")
362 ULONG UserReference = 0;
376 if (IrpContext->Vcb ==
NULL) {
456 if ((
Vcb->VcbCleanup == 0) &&
466 if ((
Vcb->VcbCleanup == 0) &&
471 PotentialVcbTeardown =
TRUE;
485 if (!PotentialVcbTeardown) {
496 if (!CdCommonClosePrivate( IrpContext,
Vcb,
Fcb, UserReference,
TRUE )) {
511 else if (PotentialVcbTeardown) {
513 CdCheckForDismount( IrpContext,
Vcb,
FALSE );
523 if (PotentialVcbTeardown) {
542CdCommonClosePrivate (
635 CdTeardownStructures( IrpContext,
Fcb, &RemovedFcb );
765 if (IrpContextLite !=
NULL) {
773 IrpContextLite->
Fcb =
Fcb;
775 IrpContextLite->
RealDevice = IrpContext->RealDevice;
826 IrpContext->ExceptionStatus = (
NTSTATUS) UserReference;
833 &IrpContext->WorkQueueItem.List );
932 WorkQueueItem.List );
944 IrpContext = NextIrpContext;
963 if ((IrpContext ==
NULL) &&
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
VOID CdCompleteRequest(_Inout_opt_ PIRP_CONTEXT IrpContext, _Inout_opt_ PIRP Irp, _In_ NTSTATUS Status)
VOID CdSetThreadContext(_Inout_ PIRP_CONTEXT IrpContext, _In_ PTHREAD_CONTEXT ThreadContext)
#define ASSERT_OPTIONAL_VCB(V)
#define ASSERT_IRP_CONTEXT(IC)
VOID CdInitializeStackIrpContext(_Out_ PIRP_CONTEXT IrpContext, _In_ PIRP_CONTEXT_LITE IrpContextLite)
VOID CdCleanupIrpContext(_In_ PIRP_CONTEXT IrpContext, _In_ BOOLEAN Post)
#define CdAcquireCdData(IC)
VOID CdFspClose(_In_opt_ PVCB Vcb)
_Inout_ PFILE_OBJECT _In_ TYPE_OF_OPEN TypeOfOpen
#define CdCreateIrpContextLite(IC)
#define CdReleaseVcb(IC, V)
#define CdFreeIrpContextLite(ICL)
#define CdReleaseFcb(IC, F)
VOID CdDeleteCcb(_In_ PIRP_CONTEXT IrpContext, _In_ __drv_freesMem(Pool) PCCB Ccb)
#define CdReleaseCdData(IC)
#define CdAcquireVcbShared(IC, V, I)
#define CdUnlockVcb(IC, V)
_Inout_ PFILE_OBJECT _In_ TYPE_OF_OPEN PFCB _In_opt_ PCCB Ccb
#define CdAcquireFcbExclusive(IC, F, I)
enum _TYPE_OF_OPEN TYPE_OF_OPEN
#define CdDecrementReferenceCounts(IC, F, C, UC)
#define IRP_CONTEXT_FSP_FLAGS
#define IRP_CONTEXT_FLAG_TOP_LEVEL_CDFS
struct _IRP_CONTEXT_LITE IRP_CONTEXT_LITE
IRP_CONTEXT * PIRP_CONTEXT
IRP_CONTEXT_LITE * PIRP_CONTEXT_LITE
#define IRP_CONTEXT_FLAG_TOP_LEVEL
#define IRP_CONTEXT_FLAG_MORE_PROCESSING
#define _Analysis_assume_lock_not_held_(lock)
#define _Requires_lock_held_(lock)
PIRP_CONTEXT CdRemoveClose(_In_opt_ PVCB Vcb)
VOID NTAPI CdCloseWorker(_In_ PDEVICE_OBJECT DeviceObject, _In_opt_ PVOID Context)
VOID CdQueueClose(_In_ PIRP_CONTEXT IrpContext, _In_ PFCB Fcb, _In_ ULONG UserReference, _In_ BOOLEAN DelayedClose)
#define CDFS_NTC_IRP_CONTEXT_LITE
#define CDFS_NTC_IRP_CONTEXT
#define SafeNodeType(Ptr)
#define RemoveEntryList(Entry)
#define InsertTailList(ListHead, Entry)
#define ClearFlag(_F, _SF)
#define FsRtlEnterFileSystem
#define FsRtlExitFileSystem
VOID NTAPI IoQueueWorkItem(IN PIO_WORKITEM IoWorkItem, IN PIO_WORKITEM_ROUTINE WorkerRoutine, IN WORK_QUEUE_TYPE QueueType, IN PVOID Context)
#define _Analysis_assume_(expr)
#define UNREFERENCED_PARAMETER(P)
#define ARGUMENT_PRESENT(ArgumentPointer)
base of all file and directory entries
ULONG MinDelayedCloseCount
BOOLEAN ReduceDelayedClose
LIST_ENTRY AsyncCloseQueue
ULONG MaxDelayedCloseCount
LIST_ENTRY DelayedCloseQueue
struct _FCB::@729::@732 Fcb
__volatile LONG FcbReference
PFCB_NONPAGED FcbNonpaged
LIST_ENTRY DelayedCloseLinks
PDEVICE_OBJECT RealDevice
NODE_BYTE_SIZE NodeByteSize
struct _LIST_ENTRY * Flink
VCB_CONDITION VcbCondition
#define CONTAINING_RECORD(address, type, field)
_In_ PDEVICE_OBJECT DeviceObject
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject