diff options
author | Cesar Eduardo Barros <cesarb@cesarb.net> | 2011-03-23 00:33:16 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-23 01:44:06 +0100 |
commit | e8e6c2ec403ecfaa226857d8204344c98fe12b7b (patch) | |
tree | 93a3cdaf385c72ba1f98add399b34ba65608efff /mm/memcontrol.c | |
parent | sys_swapon: remove changelog from function comment (diff) | |
download | linux-e8e6c2ec403ecfaa226857d8204344c98fe12b7b.tar.xz linux-e8e6c2ec403ecfaa226857d8204344c98fe12b7b.zip |
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 <cesarb@cesarb.net>
Tested-by: Eric B Munson <emunson@mgebm.net>
Acked-by: Eric B Munson <emunson@mgebm.net>
Reviewed-by: Pekka Enberg <penberg@kernel.org>
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujisu.com>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/memcontrol.c')
0 files changed, 0 insertions, 0 deletions