[XFS] eagerly remove vmap mappings to avoid upsetting Xen
[deliverable/linux.git] / fs / xfs / linux-2.6 / xfs_buf.c
index 8d9298c99763f9a5f090fd63992096a5f2ac86fa..d5b2d2bbf5ff89536e53f4a148095d3052036e48 100644 (file)
@@ -187,6 +187,19 @@ free_address(
 {
        a_list_t        *aentry;
 
+#ifdef CONFIG_XEN
+       /*
+        * Xen needs to be able to make sure it can get an exclusive
+        * RO mapping of pages it wants to turn into a pagetable.  If
+        * a newly allocated page is also still being vmap()ed by xfs,
+        * it will cause pagetable construction to fail.  This is a
+        * quick workaround to always eagerly unmap pages so that Xen
+        * is happy.
+        */
+       vunmap(addr);
+       return;
+#endif
+
        aentry = kmalloc(sizeof(a_list_t), GFP_NOWAIT);
        if (likely(aentry)) {
                spin_lock(&as_lock);
This page took 0.024041 seconds and 5 git commands to generate.