Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 36392121 authored by Vinayak Menon's avatar Vinayak Menon
Browse files

mm: process_reclaim: fix shared anon reclaim



Exit as soon as rmap_one is called for the target vma.
No need to unmap page from rest of vmas.

Fixes: 434fe4e6 ("mm: Enhance per process reclaim to consider shared pages")
Change-Id: I583704b7623c4ff57b6acee7458910fab833adcd
Signed-off-by: default avatarVinayak Menon <vinmenon@codeaurora.org>
parent f6f026ce
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1723,6 +1723,7 @@ static void rmap_walk_anon(struct page *page, struct rmap_walk_control *rwc,
		unsigned long address = vma_address(page, rwc->target_vma);

		rwc->rmap_one(page, rwc->target_vma, address, rwc->arg);
		return;
	}

	if (locked) {