From: Christoph Lameter <clameter@sgi.com>
To: akpm@osdl.org
Cc: linux-mm@kvack.org, Christoph Lameter <clameter@sgi.com>
Subject: [PATCH 3/5] page migration: Remove useless mapping checks
Date: Mon, 8 May 2006 23:51:57 -0700 (PDT) [thread overview]
Message-ID: <20060509065157.24194.33125.sendpatchset@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <20060509065146.24194.47401.sendpatchset@schroedinger.engr.sgi.com>
Remove another check for mapping
Page migration still checked for mapping being NULL after
taking the tree_lock. However the mapping never changes for a locked page.
Remove two more checks for mapping being NULL.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Index: linux-2.6.17-rc3/mm/migrate.c
===================================================================
--- linux-2.6.17-rc3.orig/mm/migrate.c 2006-04-30 22:45:53.794977846 -0700
+++ linux-2.6.17-rc3/mm/migrate.c 2006-05-03 21:49:52.957619975 -0700
@@ -291,7 +291,7 @@
if (!mapping) {
/* Anonymous page */
- if (page_count(page) != 1 || !page->mapping)
+ if (page_count(page) != 1)
return -EAGAIN;
return 0;
}
@@ -302,8 +302,7 @@
&mapping->page_tree,
page_index(page));
- if (!page_mapping(page) ||
- page_count(page) != 2 + !!PagePrivate(page) ||
+ if (page_count(page) != 2 + !!PagePrivate(page) ||
*radix_pointer != page) {
write_unlock_irq(&mapping->tree_lock);
return -EAGAIN;
--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2006-05-09 6:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-09 6:51 [PATCH 1/5] page migration: ifdef out code Christoph Lameter
2006-05-09 6:51 ` [PATCH 2/5] page migration: Update comments Christoph Lameter
2006-05-09 6:51 ` Christoph Lameter [this message]
2006-05-09 6:52 ` [PATCH 4/5] page migration: Fix up remove_migration_ptes() Christoph Lameter
2006-05-09 6:52 ` [PATCH 5/5] page migration: Replace call to pageout() with writepage() Christoph Lameter
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=20060509065157.24194.33125.sendpatchset@schroedinger.engr.sgi.com \
--to=clameter@sgi.com \
--cc=akpm@osdl.org \
--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;
as well as URLs for NNTP newsgroup(s).