]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - include/linux/swapops.h
mm: soft-dirty: keep soft-dirty bits over thp migration
[mirror_ubuntu-bionic-kernel.git] / include / linux / swapops.h
index 82089fd88c29927164b9fcda1634612859022882..45b092aa6419959c37ce0f7d57d64ba751a43c01 100644 (file)
@@ -183,6 +183,8 @@ static inline swp_entry_t pmd_to_swp_entry(pmd_t pmd)
 {
        swp_entry_t arch_entry;
 
+       if (pmd_swp_soft_dirty(pmd))
+               pmd = pmd_swp_clear_soft_dirty(pmd);
        arch_entry = __pmd_to_swp_entry(pmd);
        return swp_entry(__swp_type(arch_entry), __swp_offset(arch_entry));
 }