From: Rafael J. Wysocki Date: Fri, 6 Jan 2006 08:14:20 +0000 (-0800) Subject: [PATCH] swsusp: fix enough_free_mem X-Git-Tag: v2.6.16-rc1~936^2~169 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e5e2fa7857f6bf46605c77d949fa6698b9b0bc28;p=pandora-kernel.git [PATCH] swsusp: fix enough_free_mem This patch fixes a problem with the function enough_free_mem() used by swsusp to verify if there is a sufficient number of memory pages available to it to create and save the suspend image. Namely, enough_free_mem() uses nr_free_pages() to obtain the number of free memory pages, which is incorrect, because this function returns the total number of free pages, including free highmem pages, and the highmem pages cannot be used by swsusp for storing the image data. The patch makes enough_free_mem() avoid counting the free highmem pages as available to swsusp. Signed-off-by: Rafael J. Wysocki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed