mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-22 08:23:05 -05:00
sys: util: fix Delays when retrying MustSucceed allocations
This commit is contained in:
parent
2ad4e30754
commit
1d8d72129d
@ -149,12 +149,13 @@ NTSTATUS FspIrpHookNext(PDEVICE_OBJECT DeviceObject, PIRP Irp, PVOID Context);
|
|||||||
|
|
||||||
static const LONG Delays[] =
|
static const LONG Delays[] =
|
||||||
{
|
{
|
||||||
-100,
|
10/*ms*/ * -10000,
|
||||||
-200,
|
10/*ms*/ * -10000,
|
||||||
-300,
|
50/*ms*/ * -10000,
|
||||||
-400,
|
50/*ms*/ * -10000,
|
||||||
-500,
|
100/*ms*/ * -10000,
|
||||||
-1000,
|
100/*ms*/ * -10000,
|
||||||
|
300/*ms*/ * -10000,
|
||||||
};
|
};
|
||||||
|
|
||||||
PVOID FspAllocatePoolMustSucceed(POOL_TYPE PoolType, SIZE_T Size, ULONG Tag)
|
PVOID FspAllocatePoolMustSucceed(POOL_TYPE PoolType, SIZE_T Size, ULONG Tag)
|
||||||
@ -166,7 +167,7 @@ PVOID FspAllocatePoolMustSucceed(POOL_TYPE PoolType, SIZE_T Size, ULONG Tag)
|
|||||||
|
|
||||||
for (ULONG i = 0, n = sizeof(Delays) / sizeof(Delays[0]);; i++)
|
for (ULONG i = 0, n = sizeof(Delays) / sizeof(Delays[0]);; i++)
|
||||||
{
|
{
|
||||||
Result = DEBUGTEST(95) ? ExAllocatePoolWithTag(PoolType, Size, Tag) : 0;
|
Result = DEBUGTEST(99) ? ExAllocatePoolWithTag(PoolType, Size, Tag) : 0;
|
||||||
if (0 != Result)
|
if (0 != Result)
|
||||||
return Result;
|
return Result;
|
||||||
|
|
||||||
@ -184,7 +185,7 @@ PVOID FspAllocateIrpMustSucceed(CCHAR StackSize)
|
|||||||
|
|
||||||
for (ULONG i = 0, n = sizeof(Delays) / sizeof(Delays[0]);; i++)
|
for (ULONG i = 0, n = sizeof(Delays) / sizeof(Delays[0]);; i++)
|
||||||
{
|
{
|
||||||
Result = DEBUGTEST(95) ? IoAllocateIrp(StackSize, FALSE) : 0;
|
Result = DEBUGTEST(99) ? IoAllocateIrp(StackSize, FALSE) : 0;
|
||||||
if (0 != Result)
|
if (0 != Result)
|
||||||
return Result;
|
return Result;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user