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

Jan Beulich <[email protected]> Tue, 28 Jul 2026 15:51:47 +0200
Newsgroups gmane.comp.emulators.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);
         }