]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - mm/balloon_compaction.c
net: hns3: Add some interface for the support of DCB feature
[mirror_ubuntu-bionic-kernel.git] / mm / balloon_compaction.c
index b06d9fe23a28c14f71c3263daaa84965dadeee45..68d28924ba79d66cec76535f19772de6dc429522 100644 (file)
@@ -139,6 +139,14 @@ int balloon_page_migrate(struct address_space *mapping,
 {
        struct balloon_dev_info *balloon = balloon_page_device(page);
 
+       /*
+        * We can not easily support the no copy case here so ignore it as it
+        * is unlikely to be use with ballon pages. See include/linux/hmm.h for
+        * user of the MIGRATE_SYNC_NO_COPY mode.
+        */
+       if (mode == MIGRATE_SYNC_NO_COPY)
+               return -EINVAL;
+
        VM_BUG_ON_PAGE(!PageLocked(page), page);
        VM_BUG_ON_PAGE(!PageLocked(newpage), newpage);