From: Pavel Machek <pavel@suse.cz>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Andrew Morton <akpm@osdl.org>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH][Fix] swsusp: Fix swap_type_of
Date: Tue, 15 Aug 2006 12:16:11 +0200 [thread overview]
Message-ID: <20060815101611.GH7496@elf.ucw.cz> (raw)
In-Reply-To: <200608151218.41041.rjw@sisk.pl>
On Tue 2006-08-15 12:18:40, Rafael J. Wysocki wrote:
> There is a bug in mm/swapfile.c#swap_type_of() that makes swsusp only be
> able to use the first active swap partition as the resume device.
> Fix it.
ACK. (And I guess this is 2.6.18 material, right? Or is that fix not
needed in mainline?)
Pavel
> Index: linux-2.6.18-rc4-mm1/mm/swapfile.c
> ===================================================================
> --- linux-2.6.18-rc4-mm1.orig/mm/swapfile.c 2006-08-13 14:54:43.000000000 +0200
> +++ linux-2.6.18-rc4-mm1/mm/swapfile.c 2006-08-14 21:09:09.000000000 +0200
> @@ -442,11 +442,12 @@ int swap_type_of(dev_t device)
>
> if (!(swap_info[i].flags & SWP_WRITEOK))
> continue;
> +
> if (!device) {
> spin_unlock(&swap_lock);
> return i;
> }
> - inode = swap_info->swap_file->f_dentry->d_inode;
> + inode = swap_info[i].swap_file->f_dentry->d_inode;
> if (S_ISBLK(inode->i_mode) &&
> device == MKDEV(imajor(inode), iminor(inode))) {
> spin_unlock(&swap_lock);
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next prev parent reply other threads:[~2006-08-15 10:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-15 10:18 Rafael J. Wysocki
2006-08-15 10:16 ` Pavel Machek [this message]
2006-08-15 11:01 ` Rafael J. Wysocki
2006-08-15 13:47 ` Antonino A. Daplas
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=20060815101611.GH7496@elf.ucw.cz \
--to=pavel@suse.cz \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rjw@sisk.pl \
/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®