From: Cesar Eduardo Barros Date: Tue, 22 Mar 2011 23:33:16 +0000 (-0700) Subject: sys_swapon: do not depend on "type" after allocation X-Git-Tag: v2.6.39-rc1~311 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e8e6c2ec403ecfaa226857d8204344c98fe12b7b;p=pandora-kernel.git sys_swapon: do not depend on "type" after allocation Within sys_swapon, after the swap_info entry has been allocated, we always have type == p->type and swap_info[type] == p. Use this fact to reduce the dependency on the "type" local variable within the function, as a preparation to move the allocation of the swap_info entry to a separate function. Signed-off-by: Cesar Eduardo Barros Tested-by: Eric B Munson Acked-by: Eric B Munson Reviewed-by: Pekka Enberg Reviewed-by: KAMEZAWA Hiroyuki Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed