Commit f7fd88b4 authored by Pavel Machek's avatar Pavel Machek Committed by Linus Torvalds

[PATCH] suspend-to-{RAM,disk} fixup

Fix compile problem with suspending diabled
parent 542f96a5
...@@ -86,16 +86,12 @@ static int rw_swap_page_base(int rw, swp_entry_t entry, struct page *page) ...@@ -86,16 +86,12 @@ static int rw_swap_page_base(int rw, swp_entry_t entry, struct page *page)
* - it's marked as being swap-cache * - it's marked as being swap-cache
* - it's associated with the swap inode * - it's associated with the swap inode
*/ */
extern long suspend_device;
void rw_swap_page(int rw, struct page *page) void rw_swap_page(int rw, struct page *page)
{ {
swp_entry_t entry; swp_entry_t entry;
entry.val = page->index; entry.val = page->index;
if (suspend_device)
panic("I refuse to corrupt memory/swap.");
if (!PageLocked(page)) if (!PageLocked(page))
PAGE_BUG(page); PAGE_BUG(page);
if (!PageSwapCache(page)) if (!PageSwapCache(page))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment