From: Hugh Dickins Date: Sat, 3 Sep 2005 22:54:33 +0000 (-0700) Subject: [PATCH] swap: move destroy_swap_extents calls X-Git-Tag: v2.6.14-rc1~987 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4cd3bb10ff0b21b77b5a4cd13b4bd36694e054c4;p=pandora-kernel.git [PATCH] swap: move destroy_swap_extents calls sys_swapon's call to destroy_swap_extents on failure is made after the final swap_list_unlock, which is faintly unsafe: another sys_swapon might already be setting up that swap_info_struct. Calling it earlier, before taking swap_list_lock, is safe. sys_swapoff's call to destroy_swap_extents was safe, but likewise move it earlier, before taking the locks (once try_to_unuse has completed, nothing can be needing the swap extents). Signed-off-by: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed