X-Git-Url: http://git.jankratochvil.net/?p=reactos.git;a=blobdiff_plain;f=drivers%2Ffs%2Fvfat%2Fclose.c;h=7fae9a7db9011da05856c46241eaebf28be3eb02;hp=6dffc5cebbcf4e39ff986170b7c780ed005df849;hb=03af8776dc14167b078911b0c7c5327d1bcdd128;hpb=f4077c1bf64ef89d74a8d4822d2d7aada3ba9927 diff --git a/drivers/fs/vfat/close.c b/drivers/fs/vfat/close.c index 6dffc5c..7fae9a7 100644 --- a/drivers/fs/vfat/close.c +++ b/drivers/fs/vfat/close.c @@ -56,26 +56,18 @@ VfatCloseFile (PDEVICE_EXTENSION DeviceExt, PFILE_OBJECT FileObject) 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; } @@ -94,8 +86,13 @@ NTSTATUS VfatClose (PVFAT_IRP_CONTEXT IrpContext) 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); }