linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Steinmetz <ast@domdv.de>
To: "Rafael J. Wysocki" <rjw@sisk.pl>, Pavel Machek <pavel@ucw.cz>,
	Linux Kernel Mailinglist <linux-kernel@vger.kernel.org>
Subject: [PATCH] fix suspend to disk swap_type_of() function
Date: Tue, 12 Sep 2006 19:49:05 +0200	[thread overview]
Message-ID: <4506F311.3090909@domdv.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 239 bytes --]

The attached patch fixes swap_type_of() for the case the suspend device
is not the first swap device. This looks like a cut'n'paste fix. Patch
is against 2.6.17.8.
-- 
Andreas Steinmetz                       SPAMmers use robotrap@domdv.de

[-- Attachment #2: suspend.patch --]
[-- Type: text/plain, Size: 448 bytes --]

--- linux.orig/mm/swapfile.c	2006-09-12 19:33:51.000000000 +0200
+++ linux/mm/swapfile.c	2006-09-12 19:34:58.000000000 +0200
@@ -444,7 +444,7 @@ int swap_type_of(dev_t 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);

                 reply	other threads:[~2006-09-12 17:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4506F311.3090909@domdv.de \
    --to=ast@domdv.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --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;
as well as URLs for NNTP newsgroup(s).