mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-23 08:53:01 -05:00
sys: FspIrpDeleteRequest
This commit is contained in:
parent
f7a739381c
commit
b729500d7b
@ -424,7 +424,7 @@ static NTSTATUS FspFsvolQueryDirectoryRetry(
|
||||
/* if we have been retried reset our work item now! */
|
||||
if (0 != Request)
|
||||
{
|
||||
FspWqDeleteIrpWorkItem(Irp);
|
||||
FspIrpDeleteRequest(Irp);
|
||||
Request = 0;
|
||||
}
|
||||
|
||||
|
@ -643,6 +643,16 @@ BOOLEAN FspIopRetryCompleteIrp(PIRP Irp, const FSP_FSCTL_TRANSACT_RSP *Response,
|
||||
FSP_FSCTL_TRANSACT_RSP *FspIopIrpResponse(PIRP Irp);
|
||||
NTSTATUS FspIopDispatchPrepare(PIRP Irp, FSP_FSCTL_TRANSACT_REQ *Request);
|
||||
NTSTATUS FspIopDispatchComplete(PIRP Irp, const FSP_FSCTL_TRANSACT_RSP *Response);
|
||||
static inline
|
||||
VOID FspIrpDeleteRequest(PIRP Irp)
|
||||
{
|
||||
FSP_FSCTL_TRANSACT_REQ *Request = FspIrpRequest(Irp);
|
||||
if (0 != Request)
|
||||
{
|
||||
FspIopDeleteRequest(Request);
|
||||
FspIrpSetRequest(Irp, 0);
|
||||
}
|
||||
}
|
||||
|
||||
/* work queue processing */
|
||||
enum
|
||||
@ -655,7 +665,6 @@ typedef NTSTATUS FSP_WQ_REQUEST_WORK(
|
||||
NTSTATUS FspWqCreateAndPostIrpWorkItem(PIRP Irp,
|
||||
FSP_WQ_REQUEST_WORK *WorkRoutine, FSP_IOP_REQUEST_FINI *RequestFini,
|
||||
BOOLEAN CreateAndPost);
|
||||
VOID FspWqDeleteIrpWorkItem(PIRP Irp);
|
||||
VOID FspWqPostIrpWorkItem(PIRP Irp);
|
||||
#define FspWqCreateIrpWorkItem(I, RW, RF)\
|
||||
FspWqCreateAndPostIrpWorkItem(I, RW, RF, FALSE)
|
||||
|
@ -95,7 +95,10 @@ NTSTATUS FspIopCreateRequestFunnel(
|
||||
}
|
||||
|
||||
if (0 != Irp)
|
||||
{
|
||||
ASSERT(0 == FspIrpRequest(Irp));
|
||||
FspIrpSetRequest(Irp, Request);
|
||||
}
|
||||
*PRequest = Request;
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
|
@ -257,6 +257,9 @@ static NTSTATUS FspFsvolReadNonCached(
|
||||
/* convert FileNode to shared */
|
||||
FspFileNodeConvertExclusiveToShared(FileNode, Full);
|
||||
|
||||
/* delete any work item if present! */
|
||||
FspIrpDeleteRequest(Irp);
|
||||
|
||||
/* create request */
|
||||
Result = FspIopCreateRequestEx(Irp, 0, 0, FspFsvolReadNonCachedRequestFini, &Request);
|
||||
if (!NT_SUCCESS(Result))
|
||||
|
12
src/sys/wq.c
12
src/sys/wq.c
@ -50,18 +50,6 @@ NTSTATUS FspWqCreateAndPostIrpWorkItem(PIRP Irp,
|
||||
return STATUS_PENDING;
|
||||
}
|
||||
|
||||
VOID FspWqDeleteIrpWorkItem(PIRP Irp)
|
||||
{
|
||||
FSP_FSCTL_TRANSACT_REQ *RequestWorkItem = FspIrpRequest(Irp);
|
||||
|
||||
ASSERT(RequestWorkItem->Kind == FspFsctlTransactReservedKind);
|
||||
ASSERT(RequestWorkItem->Size == sizeof *RequestWorkItem + sizeof(WORK_QUEUE_ITEM));
|
||||
ASSERT(RequestWorkItem->Hint == (UINT_PTR)Irp);
|
||||
|
||||
FspIopDeleteRequest(RequestWorkItem);
|
||||
FspIrpSetRequest(Irp, 0);
|
||||
}
|
||||
|
||||
VOID FspWqPostIrpWorkItem(PIRP Irp)
|
||||
{
|
||||
FSP_FSCTL_TRANSACT_REQ *RequestWorkItem = FspIrpRequest(Irp);
|
||||
|
@ -320,6 +320,9 @@ static NTSTATUS FspFsvolWriteNonCached(
|
||||
}
|
||||
}
|
||||
|
||||
/* delete any work item if present! */
|
||||
FspIrpDeleteRequest(Irp);
|
||||
|
||||
/* create request */
|
||||
Result = FspIopCreateRequestEx(Irp, 0, 0, FspFsvolWriteNonCachedRequestFini, &Request);
|
||||
if (!NT_SUCCESS(Result))
|
||||
|
Loading…
x
Reference in New Issue
Block a user