]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - mm/fremap.c
Merge tag 'pci-v3.16-changes-2' of git://git.kernel.org/pub/scm/linux/kernel/git...
[karo-tx-linux.git] / mm / fremap.c
index 34feba60a17e6dce30b2cdfa929926ad5a450bee..72b8fa36143328f728a44de1b5cd53b629653a0a 100644 (file)
@@ -82,13 +82,10 @@ static int install_file_pte(struct mm_struct *mm, struct vm_area_struct *vma,
 
        ptfile = pgoff_to_pte(pgoff);
 
-       if (!pte_none(*pte)) {
-               if (pte_present(*pte) && pte_soft_dirty(*pte))
-                       pte_file_mksoft_dirty(ptfile);
+       if (!pte_none(*pte))
                zap_pte(mm, vma, addr, pte);
-       }
 
-       set_pte_at(mm, addr, pte, ptfile);
+       set_pte_at(mm, addr, pte, pte_file_mksoft_dirty(ptfile));
        /*
         * We don't need to run update_mmu_cache() here because the "file pte"
         * being installed by install_file_pte() is not a real pte - it's a
@@ -152,6 +149,10 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
        int has_write_lock = 0;
        vm_flags_t vm_flags = 0;
 
+       pr_warn_once("%s (%d) uses deprecated remap_file_pages() syscall. "
+                       "See Documentation/vm/remap_file_pages.txt.\n",
+                       current->comm, current->pid);
+
        if (prot)
                return err;
        /*