mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
[FASTFAT]
- Store IO VPB in our VCB for later use - Prepare a spare VPB in our VCB for dismount swapout svn path=/trunk/; revision=65361
This commit is contained in:
parent
0343b8c5b5
commit
f00ed8906d
2 changed files with 14 additions and 0 deletions
|
@ -521,6 +521,14 @@ VfatMount(
|
|||
/* Initialize this resource early ... it's used in VfatCleanup */
|
||||
ExInitializeResourceLite(&DeviceExt->DirResource);
|
||||
|
||||
DeviceExt->IoVPB = DeviceObject->Vpb;
|
||||
DeviceExt->SpareVPB = ExAllocatePoolWithTag(NonPagedPool, sizeof(VPB), TAG_VFAT);
|
||||
if (DeviceExt->SpareVPB == NULL)
|
||||
{
|
||||
Status = STATUS_INSUFFICIENT_RESOURCES;
|
||||
goto ByeBye;
|
||||
}
|
||||
|
||||
DeviceExt->FATFileObject = IoCreateStreamFileObject(NULL, DeviceExt->StorageDevice);
|
||||
Fcb = vfatNewFCB(DeviceExt, &NameU);
|
||||
if (Fcb == NULL)
|
||||
|
@ -622,6 +630,8 @@ ByeBye:
|
|||
/* Cleanup */
|
||||
if (DeviceExt && DeviceExt->FATFileObject)
|
||||
ObDereferenceObject (DeviceExt->FATFileObject);
|
||||
if (DeviceExt && DeviceExt->SpareVPB)
|
||||
ExFreePoolWithTag(DeviceExt->SpareVPB, TAG_VFAT);
|
||||
if (Fcb)
|
||||
vfatDestroyFCB(Fcb);
|
||||
if (Ccb)
|
||||
|
|
|
@ -299,6 +299,10 @@ typedef struct DEVICE_EXTENSION
|
|||
|
||||
/* Incremented on IRP_MJ_CREATE, decremented on IRP_MJ_CLEANUP */
|
||||
ULONG OpenHandleCount;
|
||||
|
||||
/* VPBs for dismount */
|
||||
PVPB IoVPB;
|
||||
PVPB SpareVPB;
|
||||
} DEVICE_EXTENSION, VCB, *PVCB;
|
||||
|
||||
typedef struct
|
||||
|
|
Loading…
Reference in a new issue