mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-23 08:53:01 -05:00
sys: WIP
This commit is contained in:
parent
427f8a20e6
commit
18091c65db
@ -150,6 +150,8 @@ VOID FspDeviceDelete(PDEVICE_OBJECT DeviceObject)
|
||||
}
|
||||
|
||||
ExDeleteResourceLite(&DeviceExtension->Resource);
|
||||
RtlZeroMemory(DeviceExtension, DeviceObject->Size - sizeof DEVICE_OBJECT);
|
||||
|
||||
IoDeleteDevice(DeviceObject);
|
||||
}
|
||||
|
||||
|
@ -269,6 +269,7 @@ typedef struct
|
||||
FSP_FSCTL_VOLUME_PARAMS VolumeParams;
|
||||
FSP_IOQ Ioq;
|
||||
PVPB SwapVpb;
|
||||
BOOLEAN Deleted;
|
||||
UINT8 SecurityDescriptorBuf[];
|
||||
} FSP_FSVRT_DEVICE_EXTENSION;
|
||||
typedef struct
|
||||
|
@ -118,7 +118,8 @@ static NTSTATUS FspFsctlMountVolume(
|
||||
PVPB Vpb = IrpSp->Parameters.MountVolume.Vpb;
|
||||
PDEVICE_OBJECT FsvrtDeviceObject = Vpb->RealDevice;
|
||||
PDEVICE_OBJECT FsvolDeviceObject;
|
||||
FSP_FSVRT_DEVICE_EXTENSION *FsvrtDeviceExtension;
|
||||
FSP_FSVRT_DEVICE_EXTENSION *FsvrtDeviceExtension =
|
||||
FspFsvrtDeviceExtension(FsvrtDeviceObject);
|
||||
FSP_FSVOL_DEVICE_EXTENSION *FsvolDeviceExtension;
|
||||
|
||||
/* check the passed in volume object; it must be one of our own */
|
||||
@ -129,7 +130,7 @@ static NTSTATUS FspFsctlMountVolume(
|
||||
Result = STATUS_UNRECOGNIZED_VOLUME;
|
||||
goto exit;
|
||||
}
|
||||
if (FspDeviceDeleted(FsvrtDeviceObject) ||
|
||||
if (FspDeviceDeleted(FsvrtDeviceObject) || FsvrtDeviceExtension->Deleted ||
|
||||
FILE_DEVICE_VIRTUAL_DISK != FsvrtDeviceObject->DeviceType)
|
||||
{
|
||||
Result = STATUS_UNRECOGNIZED_VOLUME;
|
||||
@ -142,7 +143,6 @@ static NTSTATUS FspFsctlMountVolume(
|
||||
&FsvolDeviceObject);
|
||||
if (NT_SUCCESS(Result))
|
||||
{
|
||||
FsvrtDeviceExtension = FspFsvrtDeviceExtension(FsvrtDeviceObject);
|
||||
FsvolDeviceExtension = FspFsvolDeviceExtension(FsvolDeviceObject);
|
||||
#pragma prefast(suppress:28175, "We are a filesystem: ok to access SectorSize")
|
||||
FsvolDeviceObject->SectorSize = FsvrtDeviceExtension->VolumeParams.SectorSize;
|
||||
@ -186,6 +186,9 @@ static NTSTATUS FspFsvrtDeleteVolume(
|
||||
if (!NT_SUCCESS(Result))
|
||||
goto exit;
|
||||
|
||||
/* mark the virtual volume device as deleted */
|
||||
FsvrtDeviceExtension->Deleted = TRUE;
|
||||
|
||||
/* stop the I/O queue */
|
||||
FspIoqStop(&FsvrtDeviceExtension->Ioq);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user