Skip to content

Commit 4480132

Browse files
author
Rafael Aquini
committed
mm: remove "prot" parameter from move_pte()
JIRA: https://issues.redhat.com/browse/RHEL-84184 JIRA: https://issues.redhat.com/browse/RHEL-80529 This patch is a backport of the following upstream commit: commit 82a616d Author: David Hildenbrand <[email protected]> Date: Wed Mar 27 15:33:01 2024 +0100 mm: remove "prot" parameter from move_pte() The "prot" parameter is unused, and using it instead of what's stored in that particular PTE would very likely be wrong. Let's simply remove it. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: David Hildenbrand <[email protected]> Reviewed-by: Vishal Moola (Oracle) <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Andreas Larsson <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Rafael Aquini <[email protected]>
1 parent 46f4820 commit 4480132

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

arch/sparc/include/asm/pgtable_64.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -941,7 +941,7 @@ static inline void __set_pte_at(struct mm_struct *mm, unsigned long addr,
941941

942942
#ifdef DCACHE_ALIASING_POSSIBLE
943943
#define __HAVE_ARCH_MOVE_PTE
944-
#define move_pte(pte, prot, old_addr, new_addr) \
944+
#define move_pte(pte, old_addr, new_addr) \
945945
({ \
946946
pte_t newpte = (pte); \
947947
if (tlb_type != hypervisor && pte_present(pte)) { \

include/linux/pgtable.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -929,7 +929,7 @@ static inline void arch_swap_restore(swp_entry_t entry, struct folio *folio)
929929
#endif
930930

931931
#ifndef __HAVE_ARCH_MOVE_PTE
932-
#define move_pte(pte, prot, old_addr, new_addr) (pte)
932+
#define move_pte(pte, old_addr, new_addr) (pte)
933933
#endif
934934

935935
#ifndef pte_accessible

mm/mremap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ static int move_ptes(struct vm_area_struct *vma, pmd_t *old_pmd,
205205
*/
206206
if (pte_present(pte))
207207
force_flush = true;
208-
pte = move_pte(pte, new_vma->vm_page_prot, old_addr, new_addr);
208+
pte = move_pte(pte, old_addr, new_addr);
209209
pte = move_soft_dirty_pte(pte);
210210
set_pte_at(mm, new_addr, new_pte, pte);
211211
}

0 commit comments

Comments
 (0)