[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>
This commit is contained in:
committed by
Linus Torvalds
parent
3fc6b34f48
commit
3aef83e0ef
@ -146,7 +146,7 @@ struct bitmap_page {
|
||||
|
||||
extern void free_bitmap(struct bitmap_page *bitmap);
|
||||
extern struct bitmap_page *alloc_bitmap(unsigned int nr_bits);
|
||||
extern unsigned long alloc_swap_page(int swap, struct bitmap_page *bitmap);
|
||||
extern sector_t alloc_swapdev_block(int swap, struct bitmap_page *bitmap);
|
||||
extern void free_all_swap_pages(int swap, struct bitmap_page *bitmap);
|
||||
|
||||
extern int swsusp_check(void);
|
||||
|
Reference in New Issue
Block a user