From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Andrew Morton <akpm@osdl.org>
Cc: Pavel Machek <pavel@suse.cz>, LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH -mm 2/2] swsusp: fix writing progress meter
Date: Wed, 15 Feb 2006 14:51:17 +0100 [thread overview]
Message-ID: <200602151451.17591.rjw@sisk.pl> (raw)
In-Reply-To: <200602151434.03575.rjw@sisk.pl>
Due to the wrong value passed to load_image() in swap.c the writing progress
meter could run over 100%. Fix it.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
kernel/power/swap.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
Index: linux-2.6.16-rc3-mm1/kernel/power/swap.c
===================================================================
--- linux-2.6.16-rc3-mm1.orig/kernel/power/swap.c 2006-02-14 23:08:49.000000000 +0100
+++ linux-2.6.16-rc3-mm1/kernel/power/swap.c 2006-02-14 23:09:26.000000000 +0100
@@ -467,7 +467,6 @@ int swsusp_read(void)
struct swap_map_handle handle;
struct snapshot_handle snapshot;
struct swsusp_info *header;
- unsigned int nr_pages;
if (IS_ERR(resume_bdev)) {
pr_debug("swsusp: block device not initialised\n");
@@ -482,10 +481,8 @@ int swsusp_read(void)
error = get_swap_reader(&handle, swsusp_header.image);
if (!error)
error = swap_read_page(&handle, header);
- if (!error) {
- nr_pages = header->image_pages;
- error = load_image(&handle, &snapshot, nr_pages);
- }
+ if (!error)
+ error = load_image(&handle, &snapshot, header->pages - 1);
release_swap_reader(&handle);
blkdev_put(resume_bdev);
prev parent reply other threads:[~2006-02-15 14:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-15 13:34 [PATCH -mm 0/2] swsusp fixes Rafael J. Wysocki
2006-02-15 13:45 ` [PATCH -mm 1/2] swsusp: userland interface fixes Rafael J. Wysocki
2006-02-15 13:51 ` Rafael J. Wysocki [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200602151451.17591.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®