diff --git a/[refs] b/[refs] index 00a92bab48f9..e1af936b6575 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6e00ec00b1a76a199b8c0acae401757b795daf57 +refs/heads/master: b9ed4f6c9a5ed2358293a92d8b3b268f28b6f2b8 diff --git a/trunk/drivers/staging/zsmalloc/zsmalloc_int.h b/trunk/drivers/staging/zsmalloc/zsmalloc_int.h index ffb272f89343..92eefc663afc 100644 --- a/trunk/drivers/staging/zsmalloc/zsmalloc_int.h +++ b/trunk/drivers/staging/zsmalloc/zsmalloc_int.h @@ -58,8 +58,10 @@ #define OBJ_INDEX_BITS (BITS_PER_LONG - _PFN_BITS) #define OBJ_INDEX_MASK ((_AC(1, UL) << OBJ_INDEX_BITS) - 1) +#define MAX(a, b) ((a) >= (b) ? (a) : (b)) /* ZS_MIN_ALLOC_SIZE must be multiple of ZS_ALIGN */ -#define ZS_MIN_ALLOC_SIZE 32 +#define ZS_MIN_ALLOC_SIZE \ + MAX(32, (ZS_MAX_PAGES_PER_ZSPAGE << PAGE_SHIFT >> OBJ_INDEX_BITS)) #define ZS_MAX_ALLOC_SIZE PAGE_SIZE /*