Skip to content

Commit f036c81

Browse files
Alexander Gordeevakpm00
authored andcommitted
mm: mmu_gather: do not expose delayed_rmap flag
Flag delayed_rmap of 'struct mmu_gather' is rather a private member, but it is still accessed directly. Instead, let the TLB gather code access the flag. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Alexander Gordeev <[email protected]> Acked-by: Linus Torvalds <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 5df397d commit f036c81

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

mm/memory.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1465,8 +1465,7 @@ static unsigned long zap_pte_range(struct mmu_gather *tlb,
14651465
/* Do the actual TLB flush before dropping ptl */
14661466
if (force_flush) {
14671467
tlb_flush_mmu_tlbonly(tlb);
1468-
if (tlb->delayed_rmap)
1469-
tlb_flush_rmaps(tlb, vma);
1468+
tlb_flush_rmaps(tlb, vma);
14701469
}
14711470
pte_unmap_unlock(start_pte, ptl);
14721471

mm/mmu_gather.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ void tlb_flush_rmaps(struct mmu_gather *tlb, struct vm_area_struct *vma)
6161
{
6262
struct mmu_gather_batch *batch;
6363

64+
if (!tlb->delayed_rmap)
65+
return;
66+
6467
batch = tlb->active;
6568
for (int i = 0; i < batch->nr; i++) {
6669
struct encoded_page *enc = batch->encoded_pages[i];

0 commit comments

Comments
 (0)