diff options
author | Michael Bestas <mkbestas@lineageos.org> | 2021-03-21 14:43:20 +0200 |
---|---|---|
committer | Michael Bestas <mkbestas@lineageos.org> | 2021-03-21 14:43:20 +0200 |
commit | 53103bcd228bc3652d294c4ea2457c105f3a6655 (patch) | |
tree | 30b74996723a35710b3eece094bf0fa6a411d360 /mm/memory.c | |
parent | 2bc69ae323d34342c2bda24adeb78c9ff321a9a3 (diff) | |
parent | db1bf2b55b337174e62637e6c23b45f166bdc14e (diff) |
Merge remote-tracking branch 'msm8998/lineage-18.1' into lineage-18.1
Change-Id: Idfef6799ea14906bf74cad7ea86df630ff07416b
Diffstat (limited to 'mm/memory.c')
-rw-r--r-- | mm/memory.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/memory.c b/mm/memory.c index 5dfc9fac8b74..8e41c675f7af 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -1686,11 +1686,11 @@ static int remap_pte_range(struct mm_struct *mm, pmd_t *pmd, unsigned long addr, unsigned long end, unsigned long pfn, pgprot_t prot) { - pte_t *pte; + pte_t *pte, *mapped_pte; spinlock_t *ptl; int err = 0; - pte = pte_alloc_map_lock(mm, pmd, addr, &ptl); + mapped_pte = pte = pte_alloc_map_lock(mm, pmd, addr, &ptl); if (!pte) return -ENOMEM; arch_enter_lazy_mmu_mode(); @@ -1704,7 +1704,7 @@ static int remap_pte_range(struct mm_struct *mm, pmd_t *pmd, pfn++; } while (pte++, addr += PAGE_SIZE, addr != end); arch_leave_lazy_mmu_mode(); - pte_unmap_unlock(pte - 1, ptl); + pte_unmap_unlock(mapped_pte, ptl); return err; } |