From: Hua Zhong Date: Mon, 15 May 2006 16:44:22 +0000 (-0700) Subject: [PATCH] fix can_share_swap_page() when !CONFIG_SWAP X-Git-Tag: v2.6.17-rc5~133 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e6333fd4ddf7a583480017f535b9ea53c116ab81;p=pandora-kernel.git [PATCH] fix can_share_swap_page() when !CONFIG_SWAP can_share_swap_page() is used to check if the page has the last reference. This avoids allocating a new page for COW if it's the last page. However, if CONFIG_SWAP is not set, can_share_swap_page() is defined as 0, thus always causes a copy for the last COW page. The below simple patch fixes it. Signed-off-by: Hua Zhong Cc: David Howells Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed