MCPcopy Create free account
hub / github.com/bobranten/Ext4Fsd / Ext2QueueCloseRequest

Function Ext2QueueCloseRequest

Ext4Fsd/close.c:189–219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

187}
188
189VOID
190Ext2QueueCloseRequest (IN PEXT2_IRP_CONTEXT IrpContext)
191{
192 ASSERT(IrpContext);
193 ASSERT((IrpContext->Identifier.Type == EXT2ICX) &&
194 (IrpContext->Identifier.Size == sizeof(EXT2_IRP_CONTEXT)));
195
196 if (IsFlagOn(IrpContext->Flags, IRP_CONTEXT_FLAG_DELAY_CLOSE)) {
197
198 if (IsFlagOn(IrpContext->Flags, IRP_CONTEXT_FLAG_FILE_BUSY)) {
199 Ext2Sleep(500); /* 0.5 sec*/
200 } else {
201 Ext2Sleep(50); /* 0.05 sec*/
202 }
203
204 } else {
205
206 SetFlag(IrpContext->Flags, IRP_CONTEXT_FLAG_WAIT);
207 SetFlag(IrpContext->Flags, IRP_CONTEXT_FLAG_DELAY_CLOSE);
208
209 IrpContext->Fcb = (PEXT2_FCB) IrpContext->FileObject->FsContext;
210 IrpContext->Ccb = (PEXT2_CCB) IrpContext->FileObject->FsContext2;
211 }
212
213 ExInitializeWorkItem(
214 &IrpContext->WorkQueueItem,
215 Ext2DeQueueCloseRequest,
216 IrpContext);
217
218 ExQueueWorkItem(&IrpContext->WorkQueueItem, DelayedWorkQueue);
219}
220
221VOID
222Ext2DeQueueCloseRequest (IN PVOID Context)

Callers 1

Ext2CloseFunction · 0.85

Calls 1

Ext2SleepFunction · 0.85

Tested by

no test coverage detected