diff options
Diffstat (limited to 'mm/zsmalloc.c')
-rw-r--r-- | mm/zsmalloc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index 00ab4cca49e4..7b904f9bed70 100644 --- a/mm/zsmalloc.c +++ b/mm/zsmalloc.c @@ -2370,6 +2370,9 @@ static int calculate_zspage_chain_size(int class_size) int i, min_waste = INT_MAX; int chain_size = 1; + if (is_power_of_2(class_size)) + return chain_size; + for (i = 1; i <= ZS_MAX_PAGES_PER_ZSPAGE; i++) { int waste; |