diff options
author | Lee Schermerhorn <Lee.Schermerhorn@hp.com> | 2009-12-14 17:58:49 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-15 08:53:16 -0800 |
commit | d4906e1aa516cc965292b43b5a26122dd4344e7e (patch) | |
tree | 78c19149282e93200d90f380a40f1e1192354936 /include/linux/swap.h | |
parent | 7509765a29cfb1a4c506c09b304aaf3b4111c653 (diff) | |
download | op-kernel-dev-d4906e1aa516cc965292b43b5a26122dd4344e7e.zip op-kernel-dev-d4906e1aa516cc965292b43b5a26122dd4344e7e.tar.gz |
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>
Diffstat (limited to 'include/linux/swap.h')
-rw-r--r-- | include/linux/swap.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/swap.h b/include/linux/swap.h index 9f0ca32..a2602a8 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h @@ -325,7 +325,7 @@ extern void swapcache_free(swp_entry_t, struct page *page); extern int free_swap_and_cache(swp_entry_t); extern int swap_type_of(dev_t, sector_t, struct block_device **); extern unsigned int count_swap_pages(int, int); -extern sector_t map_swap_page(swp_entry_t, struct block_device **); +extern sector_t map_swap_page(struct page *, struct block_device **); extern sector_t swapdev_block(int, pgoff_t); extern int reuse_swap_page(struct page *); extern int try_to_free_swap(struct page *); |