crush: fix memory leak when destroying tree buckets
[pandora-kernel.git] / mm / page_alloc.c
index d2186ec..a13ded1 100644 (file)
@@ -5236,6 +5236,7 @@ void *__init alloc_large_system_hash(const char *tablename,
                max = ((unsigned long long)nr_all_pages << PAGE_SHIFT) >> 4;
                do_div(max, bucketsize);
        }
+       max = min(max, 0x80000000ULL);
 
        if (numentries > max)
                numentries = max;