From: Cesar Eduardo Barros Date: Tue, 22 Mar 2011 23:33:37 +0000 (-0700) Subject: sys_swapon: separate final enabling of the swapfile X-Git-Tag: v2.6.39-rc1~290 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=40531542e2832419566c997af0808513f6f2815d;p=pandora-kernel.git sys_swapon: separate final enabling of the swapfile The block in sys_swapon which does the final adjustments to the swap_info_struct and to swap_list is the same as the block which re-inserts it again at sys_swapoff on failure of try_to_unuse(). Move this code to a separate function, and use it both in sys_swapon and sys_swapoff. 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