if (pFcb->Flags & FCB_DELETE_PENDING)
{
delEntry (DeviceExt, FileObject);
- pFcb->Flags &= ~FCB_UPDATE_DIRENTRY;
}
else
Status = STATUS_DELETE_PENDING;
}
- if (pFcb->Flags & FCB_UPDATE_DIRENTRY)
- {
- VfatUpdateEntry (DeviceExt, FileObject);
- pFcb->Flags &= ~FCB_UPDATE_DIRENTRY;
- }
FileObject->FsContext2 = NULL;
vfatReleaseFCB (DeviceExt, pFcb);
}
else
FileObject->FsContext2 = NULL;
- if (pCcb->DirectorySearchPattern)
- ExFreePool(pCcb->DirectorySearchPattern);
- ExFreePool (pCcb);
-
+ vfatDestroyCCB(pCcb);
+
return Status;
}
Status = STATUS_SUCCESS;
goto ByeBye;
}
-
+#if 0
+ /* There occurs a dead look at the call to CcRosDeleteFileCache/ObDereferenceObject/VfatClose
+ in CmLazyCloseThreadMain if VfatClose is execute asynchronous in a worker thread. */
if (!ExAcquireResourceExclusiveLite (&IrpContext->DeviceExt->DirResource, IrpContext->Flags & IRPCONTEXT_CANWAIT))
+#else
+ if (!ExAcquireResourceExclusiveLite (&IrpContext->DeviceExt->DirResource, TRUE))
+#endif
{
return VfatQueueRequest (IrpContext);
}