Fix mount hash table
PATCH 1/1 Fix mount hash table
On my 512MB machine with 6 mount points the mount hash table uses 64K. This patch brings it to a more reasonable size by limiting it to one page.
Patch against 2.5.4pre1. Please apply.
-Andi
fs/namespace.c renamed from fs/namespace.c-o +3 -9
@@ -1048,15 +1048,9 @@if (!mnt_cache)panic ("Cannot create vfsmount cache" ); - mempages >>= (16 -PAGE_SHIFT ); - mempages *=sizeof (struct list_head ); -for (order =0 ; ((1UL << order) <<PAGE_SHIFT ) < mempages; order++) - ; - -do { - mount_hashtable = (struct list_head *) -__get_free_pages (GFP_ATOMIC , order); - }while (mount_hashtable ==NULL && --order >=0 ); + order =0 ; + mount_hashtable = (struct list_head *) +__get_free_pages (GFP_ATOMIC , order);if (!mount_hashtable)panic ("Failed to allocate mount hash table\n" );