#include "vfat.h"
#include <debug.h>
Go to the source code of this file.
◆ NDEBUG
◆ VfatClose()
Definition at line 212 of file close.c.
214{
216
218
220 {
221 DPRINT(
"Closing file system\n");
224 }
226 {
228 }
229
232
234
236}
#define IRPCONTEXT_CANWAIT
NTSTATUS VfatCloseFile(PDEVICE_EXTENSION DeviceExt, PFILE_OBJECT FileObject)
#define ExAcquireResourceExclusiveLite(res, wait)
#define BooleanFlagOn(F, SF)
PVFAT_GLOBAL_DATA VfatGlobalData
VOID FASTCALL ExReleaseResourceLite(IN PERESOURCE Resource)
PDEVICE_OBJECT DeviceObject
PDEVICE_OBJECT DeviceObject
PDEVICE_EXTENSION DeviceExt
FORCEINLINE NTSTATUS VfatMarkIrpContextForQueue(PVFAT_IRP_CONTEXT IrpContext)
Referenced by VfatDispatchRequest().
◆ VfatCloseFile()
Definition at line 159 of file close.c.
162{
167
168 DPRINT(
"VfatCloseFile(DeviceExt %p, FileObject %p)\n",
170
171
174
176 {
178 }
179
181
182 if (pCcb)
183 {
185 }
186
187
190 {
192 }
193
197
198#ifdef ENABLE_SWAPOUT
199 if (IsVolume && DeviceExt->OpenHandleCount == 0)
200 {
202 }
203#endif
204
206}
#define NT_SUCCESS(StatCode)
NTSTATUS VfatPostCloseFile(PDEVICE_EXTENSION DeviceExt, PFILE_OBJECT FileObject)
VOID VfatCommonCloseFile(PDEVICE_EXTENSION DeviceExt, PVFATFCB pFcb)
BOOLEAN VfatCheckForDismount(IN PDEVICE_EXTENSION DeviceExt, IN BOOLEAN Force)
struct _VFATFCB * PVFATFCB
#define FCB_DELAYED_CLOSE
struct _VFATCCB * PVFATCCB
VOID vfatDestroyCCB(PVFATCCB pCcb)
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
Referenced by VfatClose(), VfatCreateFile(), and vfatPrepareTargetForRename().
◆ VfatCloseWorker()
Definition at line 55 of file close.c.
58{
64
65
68 {
71
72
74
77
78
80 pFcb = CloseContext->
Fcb;
82
84 {
85
90 ConcurrentDeletion =
FALSE;
91 }
92 else
93 {
94
95 ConcurrentDeletion =
TRUE;
96 }
98
99
100 if (!ConcurrentDeletion)
101 {
103 }
104
105
107 }
108
109
112}
#define IsListEmpty(ListHead)
#define RemoveHeadList(ListHead)
#define InitializeListHead(ListHead)
#define ClearFlag(_F, _SF)
VOID FASTCALL ExAcquireFastMutex(IN PFAST_MUTEX FastMutex)
VOID FASTCALL ExReleaseFastMutex(IN PFAST_MUTEX FastMutex)
BOOLEAN CloseWorkerRunning
PAGED_LOOKASIDE_LIST CloseContextLookasideList
struct _VFAT_CLOSE_CONTEXT * CloseContext
LIST_ENTRY CloseListEntry
#define CONTAINING_RECORD(address, type, field)
Referenced by VfatPostCloseFile().
◆ VfatCommonCloseFile()
Definition at line 19 of file close.c.
22{
23
25 {
26 return;
27 }
28
29
30
31
33 {
36 if (tmpFileObject !=
NULL)
37 {
42 }
43 }
44
45#ifdef KDBG
46 pFcb->
Flags |= FCB_CLOSED;
47#endif
48
49
51}
#define FCB_CACHE_INITIALIZED
BOOLEAN NTAPI CcUninitializeCacheMap(IN PFILE_OBJECT FileObject, IN OPTIONAL PLARGE_INTEGER TruncateSize, IN OPTIONAL PCACHE_UNINITIALIZE_EVENT UninitializeEvent)
VOID vfatReleaseFCB(PDEVICE_EXTENSION pVCB, PVFATFCB pFCB)
#define ObDereferenceObject
Referenced by VfatCloseFile(), and VfatCloseWorker().
◆ VfatPostCloseFile()
Definition at line 115 of file close.c.
118{
120
121
123 if (CloseContext ==
NULL)
124 {
126 }
127
128
129 CloseContext->
Vcb = DeviceExt;
132
133
135
136
139
140
141
142
144 {
147 }
148
149
151
153}
VOID NTAPI VfatCloseWorker(IN PDEVICE_OBJECT DeviceObject, IN PVOID Context)
#define InsertTailList(ListHead, Entry)
VOID NTAPI IoQueueWorkItem(IN PIO_WORKITEM IoWorkItem, IN PIO_WORKITEM_ROUTINE WorkerRoutine, IN WORK_QUEUE_TYPE QueueType, IN PVOID Context)
PIO_WORKITEM CloseWorkItem
#define STATUS_INSUFFICIENT_RESOURCES
Referenced by VfatCloseFile().