Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=87f7f8fe328388a1430a4c27cbe684f3925fd8a5
Commit:     87f7f8fe328388a1430a4c27cbe684f3925fd8a5
Parent:     beaff6333b4a21e8f3b7f9a7c3c8f8716b2334bc
Author:     Ingo Molnar <[EMAIL PROTECTED]>
AuthorDate: Mon Feb 4 16:48:10 2008 +0100
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Mon Feb 4 16:48:10 2008 +0100

    x86: cpa, clean up code flow
    
    Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
    Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]>
---
 arch/x86/mm/pageattr.c |   20 +++++++++-----------
 1 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
index fb2eedb..4f03350 100644
--- a/arch/x86/mm/pageattr.c
+++ b/arch/x86/mm/pageattr.c
@@ -423,8 +423,8 @@ out_unlock:
 
 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:
@@ -476,26 +476,24 @@ repeat:
         * 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;
 }
 
 /**
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to