From: David Rientjes Date: Tue, 22 Sep 2009 00:04:31 +0000 (-0700) Subject: flex_array: add flex_array_shrink function X-Git-Tag: v2.6.32-rc1~436 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4af5a2f770cc8575840ccb1514ec76ecb592985c;p=pandora-kernel.git flex_array: add flex_array_shrink function Add a new function to the flex_array API: int flex_array_shrink(struct flex_array *fa) This function will free all unused second-level pages. Since elements are now poisoned if they are not allocated with __GFP_ZERO, it's possible to identify parts that consist solely of unused elements. flex_array_shrink() returns the number of pages freed. Signed-off-by: David Rientjes Cc: Dave Hansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed