Commit e4406863 authored by Andrew Morton's avatar Andrew Morton Committed by Jaroslav Kysela

[PATCH] Set a minimum hash table size for wait_on_page()

Fixes the problem identified by Miles Bader on extremely small zones:
calling hash_long with `bits = 0' is treated as `bits = 32'.

So don't permit the zone to have a one-slot waitqueue hashtable.
parent c1859213
......@@ -996,7 +996,7 @@ static inline unsigned long wait_table_size(unsigned long pages)
*/
size = min(size, 4096UL);
return size;
return max(size, 4UL);
}
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment