mirror of
https://github.com/winfsp/winfsp.git
synced 2025-07-03 09:22:57 -05:00
sys, dll: IRP_MJ_DIRECTORY_CONTROL: implementation
This commit is contained in:
11
src/sys/wq.c
11
src/sys/wq.c
@ -17,9 +17,9 @@ NTSTATUS FspWqCreateAndPostIrpWorkItem(PIRP Irp,
|
||||
if (0 == RequestWorkItem)
|
||||
{
|
||||
NTSTATUS Result;
|
||||
|
||||
/* probe and lock the user buffer (if not an MDL request) */
|
||||
PIO_STACK_LOCATION IrpSp = IoGetCurrentIrpStackLocation(Irp);
|
||||
|
||||
/* lock/buffer the user buffer */
|
||||
if ((IRP_MJ_READ == IrpSp->MajorFunction || IRP_MJ_WRITE == IrpSp->MajorFunction) &&
|
||||
!FlagOn(IrpSp->MinorFunction, IRP_MN_MDL))
|
||||
{
|
||||
@ -30,6 +30,13 @@ NTSTATUS FspWqCreateAndPostIrpWorkItem(PIRP Irp,
|
||||
if (!NT_SUCCESS(Result))
|
||||
return Result;
|
||||
}
|
||||
else if (IRP_MJ_DIRECTORY_CONTROL == IrpSp->MajorFunction &&
|
||||
IRP_MN_QUERY_DIRECTORY == IrpSp->MinorFunction)
|
||||
{
|
||||
Result = FspBufferUserBuffer(Irp, IrpSp->Parameters.QueryDirectory.Length, IoWriteAccess);
|
||||
if (!NT_SUCCESS(Result))
|
||||
return Result;
|
||||
}
|
||||
|
||||
Result = FspIopCreateRequestWorkItem(Irp, sizeof(WORK_QUEUE_ITEM),
|
||||
RequestFini, &RequestWorkItem);
|
||||
|
Reference in New Issue
Block a user