mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-22 16:33:02 -05:00
sys: FSP_STATUS_IGNORE_BIT
This commit is contained in:
parent
8f25dd6cab
commit
1713ce9c9e
@ -40,6 +40,7 @@
|
||||
|
||||
/* private NTSTATUS codes */
|
||||
#define FSP_STATUS_PRIVATE_BIT (0x20000000)
|
||||
#define FSP_STATUS_IGNORE_BIT (0x10000000)
|
||||
#define FSP_STATUS_IOQ_POST (FSP_STATUS_PRIVATE_BIT | 0x0000)
|
||||
#define FSP_STATUS_IOQ_POST_BEST_EFFORT (FSP_STATUS_PRIVATE_BIT | 0x0001)
|
||||
|
||||
@ -198,7 +199,7 @@ VOID FspDebugLogIrp(const char *func, PIRP Irp, NTSTATUS Result);
|
||||
} while (0,0)
|
||||
#define FSP_LEAVE_MJ(fmt, ...) \
|
||||
FSP_LEAVE_( \
|
||||
if (STATUS_PENDING != Result) \
|
||||
if (STATUS_PENDING != Result && !(FSP_STATUS_IGNORE_BIT & Result))\
|
||||
{ \
|
||||
ASSERT(0 == (FSP_STATUS_PRIVATE_BIT & Result) ||\
|
||||
FSP_STATUS_IOQ_POST == Result || FSP_STATUS_IOQ_POST_BEST_EFFORT == Result);\
|
||||
@ -225,6 +226,8 @@ VOID FspDebugLogIrp(const char *func, PIRP Irp, NTSTATUS Result);
|
||||
else \
|
||||
FspIopCompleteIrpEx(Irp, Result, fsp_device_deref);\
|
||||
} \
|
||||
else \
|
||||
Result &= ~FSP_STATUS_IGNORE_BIT;\
|
||||
IoSetTopLevelIrp(fsp_top_level_irp);\
|
||||
); \
|
||||
return Result
|
||||
|
@ -1872,21 +1872,21 @@ NTSTATUS FspFileNodeProcessLockIrp(FSP_FILE_NODE *FileNode, PIRP Irp)
|
||||
{
|
||||
PAGED_CODE();
|
||||
|
||||
IoMarkIrpPending(Irp);
|
||||
NTSTATUS Result;
|
||||
|
||||
try
|
||||
{
|
||||
FsRtlProcessFileLock(&FileNode->FileLock, Irp, FileNode);
|
||||
Result = FsRtlProcessFileLock(&FileNode->FileLock, Irp, FileNode);
|
||||
}
|
||||
except (EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
Irp->IoStatus.Status = GetExceptionCode();
|
||||
Irp->IoStatus.Information = 0;
|
||||
|
||||
FspFileNodeCompleteLockIrp(FileNode, Irp);
|
||||
Result = FspFileNodeCompleteLockIrp(FileNode, Irp);
|
||||
}
|
||||
|
||||
return STATUS_PENDING;
|
||||
return Result;
|
||||
}
|
||||
|
||||
static NTSTATUS FspFileNodeCompleteLockIrp(PVOID Context, PIRP Irp)
|
||||
|
@ -450,18 +450,15 @@ static NTSTATUS FspFsvolFileSystemControlOplock(
|
||||
|
||||
/*
|
||||
* FspOplockFsctrl takes ownership of the IRP under all circumstances.
|
||||
*
|
||||
* We mark the IRP pending so that we can safely return STATUS_PENDING.
|
||||
*/
|
||||
|
||||
IoSetTopLevelIrp(0);
|
||||
|
||||
IoMarkIrpPending(Irp);
|
||||
Result = FspFileNodeOplockFsctl(FileNode, Irp, OplockCount);
|
||||
|
||||
FspFileNodeRelease(FileNode, Main);
|
||||
|
||||
return STATUS_PENDING;
|
||||
return Result | FSP_STATUS_IGNORE_BIT;
|
||||
|
||||
unlock_exit:
|
||||
FspFileNodeRelease(FileNode, Main);
|
||||
|
@ -66,11 +66,10 @@ static NTSTATUS FspFsvolLockControlRetry(
|
||||
|
||||
/* let the FSRTL package handle this one! */
|
||||
Result = FspFileNodeProcessLockIrp(FileNode, Irp);
|
||||
ASSERT(STATUS_PENDING == Result);
|
||||
|
||||
FspFileNodeReleaseF(FileNode, IrpFlags);
|
||||
|
||||
return Result;
|
||||
return Result | FSP_STATUS_IGNORE_BIT;
|
||||
}
|
||||
|
||||
static NTSTATUS FspFsvolLockControl(
|
||||
|
@ -145,7 +145,7 @@ static VOID FspWqWorkRoutine(PVOID Context)
|
||||
IoSetTopLevelIrp(Irp);
|
||||
|
||||
Result = WorkRoutine(DeviceObject, Irp, IrpSp, TRUE);
|
||||
if (STATUS_PENDING != Result)
|
||||
if (STATUS_PENDING != Result && !(FSP_STATUS_IGNORE_BIT & Result))
|
||||
{
|
||||
ASSERT(0 == (FSP_STATUS_PRIVATE_BIT & Result) ||
|
||||
FSP_STATUS_IOQ_POST == Result || FSP_STATUS_IOQ_POST_BEST_EFFORT == Result);
|
||||
|
Loading…
x
Reference in New Issue
Block a user