diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2006-12-06 23:34:10 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-07 11:39:27 -0500 |
commit | 3aef83e0ef1ffb8ea3bea97be46821a45c952173 (patch) | |
tree | f73878eb2ecce804c9eea6fbb13603907b3674b4 /include | |
parent | 3fc6b34f4803b959c1e30c15247e2180cd529115 (diff) |
[PATCH] swsusp: use block device offsets to identify swap locations
Make swsusp use block device offsets instead of swap offsets to identify swap
locations and make it use the same code paths for writing as well as for
reading data.
This allows us to use the same code for handling swap files and swap
partitions and to simplify the code, eg. by dropping rw_swap_page_sync().
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/swap.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/linux/swap.h b/include/linux/swap.h index d51e35e4e168..add51cebc8d9 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -218,8 +218,6 @@ extern void swap_unplug_io_fn(struct backing_dev_info *, struct page *); | |||
218 | /* linux/mm/page_io.c */ | 218 | /* linux/mm/page_io.c */ |
219 | extern int swap_readpage(struct file *, struct page *); | 219 | extern int swap_readpage(struct file *, struct page *); |
220 | extern int swap_writepage(struct page *page, struct writeback_control *wbc); | 220 | extern int swap_writepage(struct page *page, struct writeback_control *wbc); |
221 | extern int rw_swap_page_sync(int rw, swp_entry_t entry, struct page *page, | ||
222 | struct bio **bio_chain); | ||
223 | extern int end_swap_bio_read(struct bio *bio, unsigned int bytes_done, int err); | 221 | extern int end_swap_bio_read(struct bio *bio, unsigned int bytes_done, int err); |
224 | 222 | ||
225 | /* linux/mm/swap_state.c */ | 223 | /* linux/mm/swap_state.c */ |
@@ -250,6 +248,7 @@ extern void free_swap_and_cache(swp_entry_t); | |||
250 | extern int swap_type_of(dev_t, sector_t); | 248 | extern int swap_type_of(dev_t, sector_t); |
251 | extern unsigned int count_swap_pages(int, int); | 249 | extern unsigned int count_swap_pages(int, int); |
252 | extern sector_t map_swap_page(struct swap_info_struct *, pgoff_t); | 250 | extern sector_t map_swap_page(struct swap_info_struct *, pgoff_t); |
251 | extern sector_t swapdev_block(int, pgoff_t); | ||
253 | extern struct swap_info_struct *get_swap_info_struct(unsigned); | 252 | extern struct swap_info_struct *get_swap_info_struct(unsigned); |
254 | extern int can_share_swap_page(struct page *); | 253 | extern int can_share_swap_page(struct page *); |
255 | extern int remove_exclusive_swap_page(struct page *); | 254 | extern int remove_exclusive_swap_page(struct page *); |