Skip to contentSkip to conversation

mm-damon-paddr-fix-missing-folio_put.patch removed from -mm tree

merged mm-hotfixes-stable Andrew Morton 1 participant 1 message Feb 28, 2023 Stable branch

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm/damon/paddr: fix missing folio_put()
has been removed from the -mm tree. Its filename was
mm-damon-paddr-fix-missing-folio_put.patch

This patch was dropped because it was merged into the mm-hotfixes-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: "andrew.yang" <[email protected]>
Subject: mm/damon/paddr: fix missing folio_put()
Date: Wed, 22 Feb 2023 14:42:20 +0800

damon_get_folio() would always increase folio _refcount and folio_isolate_lru() would increase folio _refcount if the folio's lru flag is set.

If an unevictable folio isolated successfully, there will be two more _refcount. The one from folio_isolate_lru() will be decreased in folio_puback_lru(), but the other one from damon_get_folio() will be left behind. This causes a pin page.

Whatever the case, the _refcount from damon_get_folio() should be decreased.

Fixes 57223ac29584 ("mm/damon/paddr: support the pageout scheme")
Cc <[email protected]> [5.16.x]

---

mm/damon/paddr.c renamed from mm/damon/paddr.c~mm-damon-paddr-fix-missing-folio_put +3 -4
@@ -250,12 +250,11 @@ static unsigned long damon_pa_pageout(st
 			folio_put(folio);
 			continue;
 		}
-		if (folio_test_unevictable(folio)) {
+		if (folio_test_unevictable(folio))
 			folio_putback_lru(folio);
-		} else {
+		else
 			list_add(&folio->lru, &folio_list);
-			folio_put(folio);
-		}
+		folio_put(folio);
 	}
 	applied = reclaim_pages(&folio_list);
 	cond_resched();

_

Patches currently in -mm which might be from [email protected] are