ARM: at91/aic: add irq domain and device tree support
[firefly-linux-kernel-4.4.55.git] / mm / filemap_xip.c
index f91b2f687343315741c9519670a96435329390f1..a4eb3113222912c9aada14bd92c6b68d01577b73 100644 (file)
@@ -263,7 +263,12 @@ found:
                                                        xip_pfn);
                if (err == -ENOMEM)
                        return VM_FAULT_OOM;
-               BUG_ON(err);
+               /*
+                * err == -EBUSY is fine, we've raced against another thread
+                * that faulted-in the same page
+                */
+               if (err != -EBUSY)
+                       BUG_ON(err);
                return VM_FAULT_NOPAGE;
        } else {
                int err, ret = VM_FAULT_OOM;