Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 82912
b: refs/heads/master
c: 87f7f8f
h: refs/heads/master
v: v3
  • Loading branch information
Ingo Molnar committed Feb 4, 2008
1 parent 38fdb78 commit 71c7c2f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: beaff6333b4a21e8f3b7f9a7c3c8f8716b2334bc
refs/heads/master: 87f7f8fe328388a1430a4c27cbe684f3925fd8a5
20 changes: 9 additions & 11 deletions trunk/arch/x86/mm/pageattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,8 +423,8 @@ static int split_large_page(pte_t *kpte, unsigned long address)

static int __change_page_attr(unsigned long address, struct cpa_data *cpa)
{
int level, do_split, err;
struct page *kpte_page;
int level, do_split;
pte_t *kpte;

repeat:
Expand Down Expand Up @@ -476,26 +476,24 @@ static int __change_page_attr(unsigned long address, struct cpa_data *cpa)
* and just change the pte:
*/
do_split = try_preserve_large_page(kpte, address, cpa);
if (do_split < 0)
return do_split;

/*
* When the range fits into the existing large page,
* return. cp->numpages and cpa->tlbflush have been updated in
* try_large_page:
*/
if (do_split == 0)
return 0;
if (do_split <= 0)
return do_split;

/*
* We have to split the large page:
*/
do_split = split_large_page(kpte, address);
if (do_split)
return do_split;
cpa->flushtlb = 1;
err = split_large_page(kpte, address);
if (!err) {
cpa->flushtlb = 1;
goto repeat;
}

goto repeat;
return err;
}

/**
Expand Down

0 comments on commit 71c7c2f

Please sign in to comment.