[BTRFS] Upgrade to 1.4

CORE-16354
This commit is contained in:
Pierre Schweitzer 2019-09-01 14:53:20 +02:00
parent a0592b71e9
commit 318da0c18c
No known key found for this signature in database
GPG key ID: 7545556C3D585B0B
43 changed files with 7554 additions and 6744 deletions

View file

@ -38,7 +38,10 @@
#include "debug.h" /* assert, DEBUGLOG */
#include "error_private.h" /* ERROR */
#include "hist.h"
#include <ntifs.h>
#include <ntddk.h>
#define HIST_ALLOC_TAG 0x54534948 // "HIST"
/* --- Error management --- */
unsigned HIST_isError(size_t code) { return ERR_isError(code); }
@ -171,8 +174,17 @@ size_t HIST_countFast_wksp(unsigned* count, unsigned* maxSymbolValuePtr,
size_t HIST_countFast(unsigned* count, unsigned* maxSymbolValuePtr,
const void* source, size_t sourceSize)
{
unsigned tmpCounters[HIST_WKSP_SIZE_U32];
return HIST_countFast_wksp(count, maxSymbolValuePtr, source, sourceSize, tmpCounters);
unsigned* tmpCounters = ExAllocatePoolWithTag(NonPagedPool, sizeof(unsigned) * HIST_WKSP_SIZE_U32, HIST_ALLOC_TAG);
size_t ret;
if (!tmpCounters)
return 0;
ret = HIST_countFast_wksp(count, maxSymbolValuePtr, source, sourceSize, tmpCounters);
ExFreePool(tmpCounters);
return ret;
}
/* HIST_count_wksp() :