From: Hugh Dickins <hugh@veritas.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 3/4] pfnmap: remove src_page from do_wp_page
Date: Tue, 29 Nov 2005 16:54:51 +0000 (GMT) [thread overview]
Message-ID: <Pine.LNX.4.61.0511291654020.5527@goblin.wat.veritas.com> (raw)
In-Reply-To: <Pine.LNX.4.61.0511291650400.5527@goblin.wat.veritas.com>
Clean away do_wp_page's "src_page": cow_user_page makes it unnecessary.
Signed-off-by: Hugh Dickins <hugh@veritas.com>
---
mm/memory.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
--- 2.6.15-rc3/mm/memory.c 2005-11-29 08:40:07.000000000 +0000
+++ linux/mm/memory.c 2005-11-29 15:59:34.000000000 +0000
@@ -1332,12 +1346,11 @@ static int do_wp_page(struct mm_struct *
unsigned long address, pte_t *page_table, pmd_t *pmd,
spinlock_t *ptl, pte_t orig_pte)
{
- struct page *old_page, *src_page, *new_page;
+ struct page *old_page, *new_page;
pte_t entry;
int ret = VM_FAULT_MINOR;
old_page = vm_normal_page(vma, address, orig_pte);
- src_page = old_page;
if (!old_page)
goto gotten;
@@ -1365,7 +1378,7 @@ gotten:
if (unlikely(anon_vma_prepare(vma)))
goto oom;
- if (src_page == ZERO_PAGE(address)) {
+ if (old_page == ZERO_PAGE(address)) {
new_page = alloc_zeroed_user_highpage(vma, address);
if (!new_page)
goto oom;
@@ -1373,7 +1386,7 @@ gotten:
new_page = alloc_page_vma(GFP_HIGHUSER, vma, address);
if (!new_page)
goto oom;
- cow_user_page(new_page, src_page, address);
+ cow_user_page(new_page, old_page, address);
}
/*
next prev parent reply other threads:[~2005-11-29 16:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-29 16:53 [PATCH 1/4] pfnmap: fix 2.6.15-rc3 driver breakage Hugh Dickins
2005-11-29 16:53 ` [PATCH 2/4] pfnmap: cow_user_page needs mask Hugh Dickins
2005-11-29 16:54 ` Hugh Dickins [this message]
2005-11-29 16:55 ` [PATCH 4/4] pfnmap: do_no_page BUG_ON again Hugh Dickins
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=Pine.LNX.4.61.0511291654020.5527@goblin.wat.veritas.com \
--to=hugh@veritas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.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
all inboxes | Powered by JetHome®