mirror of
				https://github.com/winfsp/winfsp.git
				synced 2025-10-30 03:28:38 -05:00 
			
		
		
		
	sys: FspVolumeTransactFsext
This commit is contained in:
		| @@ -1242,6 +1242,8 @@ NTSTATUS FspVolumeGetNameList( | ||||
|     PDEVICE_OBJECT FsctlDeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp); | ||||
| NTSTATUS FspVolumeTransact( | ||||
|     PDEVICE_OBJECT FsctlDeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp); | ||||
| NTSTATUS FspVolumeTransactFsext( | ||||
|     PDEVICE_OBJECT FsctlDeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp); | ||||
| NTSTATUS FspVolumeStop( | ||||
|     PDEVICE_OBJECT FsctlDeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp); | ||||
| NTSTATUS FspVolumeWork( | ||||
|   | ||||
| @@ -99,27 +99,7 @@ static NTSTATUS FspFsctlFileSystemControl( | ||||
|             break; | ||||
|         default: | ||||
|             if (0 != IrpSp->FileObject->FsContext2) | ||||
|             { | ||||
|                 PDEVICE_OBJECT FsvolDeviceObject = IrpSp->FileObject->FsContext2; | ||||
|                 if (!FspDeviceReference(FsvolDeviceObject)) | ||||
|                 { | ||||
|                     Result = STATUS_CANCELLED; | ||||
|                     break; | ||||
|                 } | ||||
|  | ||||
|                 FSP_FSVOL_DEVICE_EXTENSION *FsvolDeviceExtension = FspFsvolDeviceExtension( | ||||
|                     FsvolDeviceObject); | ||||
|                 if (IrpSp->Parameters.FileSystemControl.FsControlCode == | ||||
|                     FsvolDeviceExtension->VolumeParams.FsextControlCode) | ||||
|                 { | ||||
|                     FSP_FSEXT_PROVIDER *Provider = FspFsextProvider( | ||||
|                         FsvolDeviceExtension->VolumeParams.FsextControlCode, 0); | ||||
|                     if (0 != Provider) | ||||
|                         Result = Provider->DeviceTransact(FsvolDeviceObject, Irp); | ||||
|                 } | ||||
|  | ||||
|                 FspDeviceDereference(FsvolDeviceObject); | ||||
|             } | ||||
|                 Result = FspVolumeTransactFsext(FsctlDeviceObject, Irp, IrpSp); | ||||
|             break; | ||||
|         } | ||||
|         break; | ||||
|   | ||||
| @@ -42,6 +42,8 @@ static NTSTATUS FspVolumeGetNameListNoLock( | ||||
|     PDEVICE_OBJECT FsctlDeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp); | ||||
| NTSTATUS FspVolumeTransact( | ||||
|     PDEVICE_OBJECT FsctlDeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp); | ||||
| NTSTATUS FspVolumeTransactFsext( | ||||
|     PDEVICE_OBJECT FsctlDeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp); | ||||
| NTSTATUS FspVolumeStop( | ||||
|     PDEVICE_OBJECT FsctlDeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp); | ||||
| NTSTATUS FspVolumeWork( | ||||
| @@ -59,6 +61,7 @@ NTSTATUS FspVolumeWork( | ||||
| #pragma alloc_text(PAGE, FspVolumeGetNameList) | ||||
| #pragma alloc_text(PAGE, FspVolumeGetNameListNoLock) | ||||
| #pragma alloc_text(PAGE, FspVolumeTransact) | ||||
| #pragma alloc_text(PAGE, FspVolumeTransactFsext) | ||||
| #pragma alloc_text(PAGE, FspVolumeStop) | ||||
| #pragma alloc_text(PAGE, FspVolumeWork) | ||||
| #endif | ||||
| @@ -914,6 +917,34 @@ exit: | ||||
|     return Result; | ||||
| } | ||||
|  | ||||
| NTSTATUS FspVolumeTransactFsext( | ||||
|     PDEVICE_OBJECT FsctlDeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp) | ||||
| { | ||||
|     PAGED_CODE(); | ||||
|  | ||||
|     ASSERT(IRP_MJ_FILE_SYSTEM_CONTROL == IrpSp->MajorFunction); | ||||
|     ASSERT(IRP_MN_USER_FS_REQUEST == IrpSp->MinorFunction); | ||||
|     ASSERT(0 != IrpSp->FileObject->FsContext2); | ||||
|  | ||||
|     PDEVICE_OBJECT FsvolDeviceObject = IrpSp->FileObject->FsContext2; | ||||
|     if (!FspDeviceReference(FsvolDeviceObject)) | ||||
|         return STATUS_CANCELLED; | ||||
|  | ||||
|     NTSTATUS Result = STATUS_INVALID_DEVICE_REQUEST; | ||||
|     if (IrpSp->Parameters.FileSystemControl.FsControlCode == | ||||
|         FspFsvolDeviceExtension(FsvolDeviceObject)->VolumeParams.FsextControlCode) | ||||
|     { | ||||
|         FSP_FSEXT_PROVIDER *Provider = FspFsextProvider( | ||||
|             IrpSp->Parameters.FileSystemControl.FsControlCode, 0); | ||||
|         if (0 != Provider) | ||||
|             Result = Provider->DeviceTransact(FsvolDeviceObject, Irp); | ||||
|     } | ||||
|  | ||||
|     FspDeviceDereference(FsvolDeviceObject); | ||||
|  | ||||
|     return Result; | ||||
| } | ||||
|  | ||||
| NTSTATUS FspVolumeStop( | ||||
|     PDEVICE_OBJECT FsctlDeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp) | ||||
| { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user