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/20240327143301.741807-1-david@redhat.com Signed-off-by: David Hildenbrand <david@redhat.com> Reviewed-by: Vishal Moola (Oracle) <vishal.moola@gmail.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Andreas Larsson <andreas@gaisler.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
3b612c8f06
commit
82a616d0f3
@ -957,7 +957,7 @@ static inline void set_ptes(struct mm_struct *mm, unsigned long addr,
|
|||||||
|
|
||||||
#ifdef DCACHE_ALIASING_POSSIBLE
|
#ifdef DCACHE_ALIASING_POSSIBLE
|
||||||
#define __HAVE_ARCH_MOVE_PTE
|
#define __HAVE_ARCH_MOVE_PTE
|
||||||
#define move_pte(pte, prot, old_addr, new_addr) \
|
#define move_pte(pte, old_addr, new_addr) \
|
||||||
({ \
|
({ \
|
||||||
pte_t newpte = (pte); \
|
pte_t newpte = (pte); \
|
||||||
if (tlb_type != hypervisor && pte_present(pte)) { \
|
if (tlb_type != hypervisor && pte_present(pte)) { \
|
||||||
|
@ -1079,7 +1079,7 @@ static inline void arch_swap_restore(swp_entry_t entry, struct folio *folio)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __HAVE_ARCH_MOVE_PTE
|
#ifndef __HAVE_ARCH_MOVE_PTE
|
||||||
#define move_pte(pte, prot, old_addr, new_addr) (pte)
|
#define move_pte(pte, old_addr, new_addr) (pte)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef pte_accessible
|
#ifndef pte_accessible
|
||||||
|
@ -205,7 +205,7 @@ static int move_ptes(struct vm_area_struct *vma, pmd_t *old_pmd,
|
|||||||
*/
|
*/
|
||||||
if (pte_present(pte))
|
if (pte_present(pte))
|
||||||
force_flush = true;
|
force_flush = true;
|
||||||
pte = move_pte(pte, new_vma->vm_page_prot, old_addr, new_addr);
|
pte = move_pte(pte, old_addr, new_addr);
|
||||||
pte = move_soft_dirty_pte(pte);
|
pte = move_soft_dirty_pte(pte);
|
||||||
set_pte_at(mm, new_addr, new_pte, pte);
|
set_pte_at(mm, new_addr, new_pte, pte);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user