diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-07-09 05:39:02 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-09 05:39:02 -0400 |
commit | d028203c0446c7f65ed2b22342a56f03c6c4a6c1 (patch) | |
tree | 6bd73a5c70b407491dc9d40ecb9e95b48233d004 /mm/mprotect.c | |
parent | f57e91682d141ea50d8c6d42cdc251b6256a3755 (diff) | |
parent | 183fe065652dbd64953afa9f389327e23e97967f (diff) |
Merge branch 'x86/core' into x86/unify-pci
Diffstat (limited to 'mm/mprotect.c')
-rw-r--r-- | mm/mprotect.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/mm/mprotect.c b/mm/mprotect.c index a5bf31c27375..acfe7c8d72fc 100644 --- a/mm/mprotect.c +++ b/mm/mprotect.c | |||
@@ -47,19 +47,17 @@ static void change_pte_range(struct mm_struct *mm, pmd_t *pmd, | |||
47 | if (pte_present(oldpte)) { | 47 | if (pte_present(oldpte)) { |
48 | pte_t ptent; | 48 | pte_t ptent; |
49 | 49 | ||
50 | /* Avoid an SMP race with hardware updated dirty/clean | 50 | ptent = ptep_modify_prot_start(mm, addr, pte); |
51 | * bits by wiping the pte and then setting the new pte | ||
52 | * into place. | ||
53 | */ | ||
54 | ptent = ptep_get_and_clear(mm, addr, pte); | ||
55 | ptent = pte_modify(ptent, newprot); | 51 | ptent = pte_modify(ptent, newprot); |
52 | |||
56 | /* | 53 | /* |
57 | * Avoid taking write faults for pages we know to be | 54 | * Avoid taking write faults for pages we know to be |
58 | * dirty. | 55 | * dirty. |
59 | */ | 56 | */ |
60 | if (dirty_accountable && pte_dirty(ptent)) | 57 | if (dirty_accountable && pte_dirty(ptent)) |
61 | ptent = pte_mkwrite(ptent); | 58 | ptent = pte_mkwrite(ptent); |
62 | set_pte_at(mm, addr, pte, ptent); | 59 | |
60 | ptep_modify_prot_commit(mm, addr, pte, ptent); | ||
63 | #ifdef CONFIG_MIGRATION | 61 | #ifdef CONFIG_MIGRATION |
64 | } else if (!pte_file(oldpte)) { | 62 | } else if (!pte_file(oldpte)) { |
65 | swp_entry_t entry = pte_to_swp_entry(oldpte); | 63 | swp_entry_t entry = pte_to_swp_entry(oldpte); |