]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge remote branch 'xentip/stable/for-linus-3.12' into linux-next
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>
Mon, 9 Sep 2013 10:51:42 +0000 (10:51 +0000)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Mon, 9 Sep 2013 10:51:42 +0000 (10:51 +0000)
arch/x86/xen/p2m.c

index 0d4ec35895d425c64567110f9d2285aaae3dc1b4..8b901e8d782dadf00091ac88a6fc859c54c4d1de 100644 (file)
@@ -990,10 +990,13 @@ int m2p_remove_override(struct page *page,
                                printk(KERN_WARNING "m2p_remove_override: "
                                                "pfn %lx mfn %lx, failed to modify kernel mappings",
                                                pfn, mfn);
+                               put_balloon_scratch_page();
                                return -1;
                        }
 
-                       mcs = xen_mc_entry(
+                       xen_mc_batch();
+
+                       mcs = __xen_mc_entry(
                                        sizeof(struct gnttab_unmap_and_replace));
                        unmap_op = mcs.args;
                        unmap_op->host_addr = kmap_op->host_addr;
@@ -1003,12 +1006,11 @@ int m2p_remove_override(struct page *page,
                        MULTI_grant_table_op(mcs.mc,
                                        GNTTABOP_unmap_and_replace, unmap_op, 1);
 
-                       xen_mc_issue(PARAVIRT_LAZY_MMU);
-
                        mcs = __xen_mc_entry(0);
                        MULTI_update_va_mapping(mcs.mc, scratch_page_address,
-                                       pfn_pte(page_to_pfn(get_balloon_scratch_page()),
+                                       pfn_pte(page_to_pfn(scratch_page),
                                        PAGE_KERNEL_RO), 0);
+
                        xen_mc_issue(PARAVIRT_LAZY_MMU);
 
                        kmap_op->host_addr = 0;