From e8e6c2ec403ecfaa226857d8204344c98fe12b7b Mon Sep 17 00:00:00 2001 From: Cesar Eduardo Barros Date: Tue, 22 Mar 2011 16:33:16 -0700 Subject: [PATCH] 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-format-patch failed