]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - fs/xfs/linux-2.6/xfs_buf.c
xfs: eagerly remove vmap mappings to avoid upsetting Xen
[karo-tx-linux.git] / fs / xfs / linux-2.6 / xfs_buf.c
index b0f0e58866de6059bcd4b0bc454e886ddde03cbc..be9e65b7fe7bdd05198aa176677702f21bd5e7fe 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);