swap: rework map_swap_page() again
authorLee Schermerhorn <Lee.Schermerhorn@hp.com>
Tue, 15 Dec 2009 01:58:49 +0000 (17:58 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 15 Dec 2009 16:53:16 +0000 (08:53 -0800)
commitd4906e1aa516cc965292b43b5a26122dd4344e7e
tree78c19149282e93200d90f380a40f1e1192354936
parent7509765a29cfb1a4c506c09b304aaf3b4111c653
swap: rework map_swap_page() again

Seems that page_io.c doesn't really need to know that page_private(page)
is the swp_entry 'val'.  Rework map_swap_page() to do what its name says
and map a page to a page offset in the swap space.

The only other caller of map_swap_page() is internal to mm/swapfile.c and
it does want to map a swap entry to the 'sector'.  So rename
map_swap_page() to map_swap_entry(), make it 'static' and and implement
map_swap_page() as a wrapper around that.

Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/swap.h
mm/page_io.c
mm/swapfile.c