X-Git-Url: http://git.jankratochvil.net/?p=reactos.git;a=blobdiff_plain;f=drivers%2Ffs%2Fvfat%2Fmisc.c;fp=drivers%2Ffs%2Fvfat%2Fmisc.c;h=ec26c9d639d7d38351d016137bf09e35bf93d585;hp=b2bd621ac1fde6203f25bfbdf1444791ffbdc366;hb=7c0db166f81fbe8c8b913d7f26048e337d383605;hpb=e3ed2d773259cc445c7ff8181ebd934931365328 diff --git a/drivers/fs/vfat/misc.c b/drivers/fs/vfat/misc.c index b2bd621..ec26c9d 100644 --- a/drivers/fs/vfat/misc.c +++ b/drivers/fs/vfat/misc.c @@ -71,15 +71,13 @@ NTSTATUS VfatLockControl( ) { PVFATFCB Fcb; - PVFATCCB Ccb; NTSTATUS Status; DPRINT("VfatLockControl(IrpContext %x)\n", IrpContext); assert(IrpContext); - Ccb = (PVFATCCB)IrpContext->FileObject->FsContext2; - Fcb = Ccb->pFcb; + Fcb = (PVFATFCB)IrpContext->FileObject->FsContext; if (IrpContext->DeviceObject == VfatGlobalData->DeviceObject) { @@ -119,8 +117,6 @@ NTSTATUS STDCALL VfatBuildRequest ( assert (DeviceObject); assert (Irp); - - FsRtlEnterFileSystem(); IrpContext = VfatAllocateIrpContext(DeviceObject, Irp); if (IrpContext == NULL) { @@ -130,9 +126,20 @@ NTSTATUS STDCALL VfatBuildRequest ( } else { + if (KeGetCurrentIrql() <= PASSIVE_LEVEL) + { + FsRtlEnterFileSystem(); + } + else + { + DPRINT1("Vfat is entered at irql = %d\n", KeGetCurrentIrql()); + } Status = VfatDispatchRequest (IrpContext); + if (KeGetCurrentIrql() <= PASSIVE_LEVEL) + { + FsRtlExitFileSystem(); + } } - FsRtlExitFileSystem(); return Status; }