- Add missing critical region acquiring to the VfatShutdown routine.

- Remove that irql <= PASSIVE_LEVEL check, always entering the critical region. And for vfat calls with an unusual high irql leave a DPRINT.

svn path=/trunk/; revision=31736
This commit is contained in:
Aleksey Bragin 2008-01-12 15:20:22 +00:00
parent cd8742fff2
commit 455c9a6b04
2 changed files with 8 additions and 13 deletions

View file

@ -142,7 +142,6 @@ NTSTATUS NTAPI VfatBuildRequest (
{
NTSTATUS Status;
PVFAT_IRP_CONTEXT IrpContext;
KIRQL Irql;
DPRINT ("VfatBuildRequest (DeviceObject %p, Irp %p)\n", DeviceObject, Irp);
@ -157,22 +156,14 @@ NTSTATUS NTAPI VfatBuildRequest (
}
else
{
Irql = KeGetCurrentIrql();
if (Irql <= PASSIVE_LEVEL)
{
FsRtlEnterFileSystem();
}
else
if (KeGetCurrentIrql() > PASSIVE_LEVEL)
{
DPRINT1("Vfat is entered at irql = %d\n", Irql);
}
FsRtlEnterFileSystem();
Status = VfatDispatchRequest (IrpContext);
if (Irql <= PASSIVE_LEVEL)
{
FsRtlExitFileSystem();
}
FsRtlExitFileSystem();
}
return Status;
}

View file

@ -51,6 +51,8 @@ VfatShutdown(PDEVICE_OBJECT DeviceObject, PIRP Irp)
DPRINT("VfatShutdown(DeviceObject %p, Irp %p)\n",DeviceObject, Irp);
FsRtlEnterFileSystem();
/* FIXME: block new mount requests */
if (DeviceObject == VfatGlobalData->DeviceObject)
@ -108,6 +110,8 @@ VfatShutdown(PDEVICE_OBJECT DeviceObject, PIRP Irp)
Irp->IoStatus.Information = 0;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
FsRtlExitFileSystem();
return(Status);
}