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

[Xen-changelog] [xen-unstable] gnttab: remove pointless NULL check



# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxx>
# Date 1334667905 -7200
# Node ID 6092641e364428e7be20c9e23497d7a1fc535112
# Parent  6017afc7044265109d98098b3c3adf7f28081858
gnttab: remove pointless NULL check

Domains in the domain hash (and hence locatable via the usual lookup
functions) can't have a NULL grant table pointer; no other function
performs such a check, so remove it from gnttab_prepare_for_transfer()
for consistency.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Acked-by: Keir Fraser <keir@xxxxxxx>
---


diff -r 6017afc70442 -r 6092641e3644 xen/common/grant_table.c
--- a/xen/common/grant_table.c  Tue Apr 17 08:31:07 2012 +0100
+++ b/xen/common/grant_table.c  Tue Apr 17 15:05:05 2012 +0200
@@ -1390,17 +1390,11 @@ static int
 gnttab_prepare_for_transfer(
     struct domain *rd, struct domain *ld, grant_ref_t ref)
 {
-    struct grant_table *rgt;
+    struct grant_table *rgt = rd->grant_table;
     grant_entry_header_t *sha;
     union grant_combo   scombo, prev_scombo, new_scombo;
     int                 retries = 0;
 
-    if ( unlikely((rgt = rd->grant_table) == NULL) )
-    {
-        gdprintk(XENLOG_INFO, "Dom %d has no grant table.\n", rd->domain_id);
-        return 0;
-    }
-
     spin_lock(&rgt->lock);
 
     if ( rgt->gt_version == 0 )

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
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®.