Re: swsusp: use non-contiguous memory on resume

From: Andrew Morton
Date: Fri Mar 04 2005 - 05:15:45 EST


Pavel Machek <pavel@xxxxxx> wrote:
>
> Subject: non-contiguous pagedir for resume
>
> This fixes problem where we could have enough memory but not in
> continuous chunk, and resume would fail.

It seems to do more that that? What's all the assembly stuff?

General point: this changlog entry doesn't describe the problem and it
doesn't describe how the patch fixes that problem. It's a model how-not-to ;)


> --- linux-mm/kernel/power/swsusp.c 2005-02-28 01:14:08.000000000 +0100
> +++ linux.middle/kernel/power/swsusp.c 2005-02-28 21:29:06.000000000 +0100
> @@ -241,7 +241,7 @@
> swp_entry_t entry;
> int error = 0;
>
> - entry = get_swap_page(NULL, swp_offset(*loc));
> + entry = get_swap_page();

Something's gone wrong here. In -mm, get_swap_page() takes two args and in
-linus it takes zero args.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/