The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@zip.com.au>
To: Pavel Machek <pavel@ucw.cz>
Cc: kernel list <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@transmeta.com>
Subject: Re: Writing to the swap space
Date: Mon, 06 May 2002 15:29:21 -0700	[thread overview]
Message-ID: <3CD703C1.A0D45C4F@zip.com.au> (raw)
In-Reply-To: <20020506221125.GA25298@elf.ucw.cz>

Pavel Machek wrote:
> 
> Hi!
> 
> For swsusp, I need to write to the swap space.
> 

Ah.  That's some left-over code.  Reads will be OK, but
writes will be unexpectedly asynchronous.  Nothing in
the kernel uses that function for writes so it didn't show up.

--- linux-2.5.14/mm/page_io.c	Tue Apr 30 17:56:30 2002
+++ 25/mm/page_io.c	Mon May  6 15:24:09 2002
@@ -117,9 +117,6 @@ void rw_swap_page_nolock(int rw, swp_ent
 	page->mapping = &swapper_space;
 	if (!rw_swap_page_base(rw, entry, page))
 		unlock_page(page);
-	if (rw == WRITE)
-		wait_on_page_writeback(page);
-	else
-		wait_on_page_locked(page);
+	wait_on_page_locked(page);
 	page->mapping = NULL;
 }


-

      reply	other threads:[~2002-05-06 22:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-06 22:11 Writing to the swap space Pavel Machek
2002-05-06 22:29 ` Andrew Morton [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=3CD703C1.A0D45C4F@zip.com.au \
    --to=akpm@zip.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=torvalds@transmeta.com \
    /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