linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Rik van Riel <riel@conectiva.com.br>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Arjan van de Ven <arjanv@redhat.com>, linux-mm@kvack.org
Subject: [PATCH] 9/4  -ac to newer rmap
Date: Wed, 13 Nov 2002 12:50:02 -0200	[thread overview]
Message-ID: <20021113145002Z80365-18062+19@imladris.surriel.com> (raw)

No need to check PageSwapCache(page) twice in a row.

(ObWork: my patches are sponsored by Conectiva, Inc)
--- linux-2.4.19/mm/page_io.c	2002-11-13 08:48:31.000000000 -0200
+++ linux-2.4-rmap/mm/page_io.c	2002-11-13 12:10:46.000000000 -0200
@@ -87,7 +87,6 @@ static int rw_swap_page_base(int rw, swp
  *  - it's marked as being swap-cache
  *  - it's associated with the swap inode
  */
-
 void rw_swap_page(int rw, struct page *page)
 {
 	swp_entry_t entry;
@@ -98,8 +97,6 @@ void rw_swap_page(int rw, struct page *p
 		PAGE_BUG(page);
 	if (!PageSwapCache(page))
 		PAGE_BUG(page);
-	if (page->mapping != &swapper_space)
-		PAGE_BUG(page);
 	if (!rw_swap_page_base(rw, entry, page))
 		UnlockPage(page);
 }
@@ -115,8 +112,6 @@ void rw_swap_page_nolock(int rw, swp_ent
 	
 	if (!PageLocked(page))
 		PAGE_BUG(page);
-	if (PageSwapCache(page))
-		PAGE_BUG(page);
 	if (page->mapping)
 		PAGE_BUG(page);
 	/* needs sync_page to wait I/O completation */
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/

                 reply	other threads:[~2002-11-13 14:50 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=20021113145002Z80365-18062+19@imladris.surriel.com \
    --to=riel@conectiva.com.br \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=arjanv@redhat.com \
    --cc=linux-mm@kvack.org \
    /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