[PATCH 5/7] gnttab: drop local "ld" from unmap_common_complete()

Jan Beulich <[email protected]>
Newsgroups org.xenproject.lists.xen-devel
Message-ID <[email protected]>
It's used exactly once, and even then only conditionally. No need to
establish the value in all cases.

Signed-off-by: Jan Beulich <[email protected]>

--- a/xen/common/grant_table.c
+++ b/xen/common/grant_table.c
@@ -1606,7 +1606,7 @@ unmap_common(
 static void
 unmap_common_complete(struct gnttab_unmap_common *op)
 {
-    struct domain *ld, *rd = op->rd;
+    struct domain *rd = op->rd;
     struct grant_table *rgt;
     struct active_grant_entry *act;
     struct page_info *pg;
@@ -1618,8 +1618,6 @@ unmap_common_complete(struct gnttab_unma
         return;
     }
 
-    ld = current->domain;
-
     rcu_lock_domain(rd);
     rgt = rd->grant_table;
 
@@ -1656,7 +1654,7 @@ unmap_common_complete(struct gnttab_unma
         if ( pg )
         {
             if ( gnttab_host_mapping_get_page_type(op->done & GNTMAP_readonly,
-                                                   ld, rd) )
+                                                   current->domain, rd) )
                 put_page_type(pg);
             put_page(pg);
         }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.