[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] x86: Small simplification to get_page_from_l1e().



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1256563603 0
# Node ID f0be14bb3f7a4d9e9d865b3a4c1433a25051ee87
# Parent  b27f85b54ecc7276f43cdcd669bda269c0715373
x86: Small simplification to get_page_from_l1e().

No need for separate top-level check for page owner being NULL: this
can be folded into the case that page owner is not who the caller
expected (caller will never expect NULL owner).

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/x86/mm.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff -r b27f85b54ecc -r f0be14bb3f7a xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c Mon Oct 26 13:19:33 2009 +0000
+++ b/xen/arch/x86/mm.c Mon Oct 26 13:26:43 2009 +0000
@@ -780,9 +780,6 @@ get_page_from_l1e(
         return 1;
     }
 
-    if ( real_pg_owner == NULL )
-        goto could_not_pin;
-
     if ( unlikely(real_pg_owner != pg_owner) )
     {
         /*
@@ -791,7 +788,8 @@ get_page_from_l1e(
          * dom0, until pvfb supports granted mappings. At that time this
          * minor hack can go away.
          */
-        if ( (pg_owner == l1e_owner) || !IS_PRIV_FOR(pg_owner, real_pg_owner) )
+        if ( (real_pg_owner == NULL) || (pg_owner == l1e_owner) ||
+             !IS_PRIV_FOR(pg_owner, real_pg_owner) )
             goto could_not_pin;
         pg_owner = real_pg_owner;
     }

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.