Skip to contentSkip to conversation

mm-demotion-fix-null-vs-is_err-checking-in-memory_tier_init.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Dec 1, 2022

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm/demotion: fix NULL vs IS_ERR checking in memory_tier_init
has been removed from the -mm tree. Its filename was
mm-demotion-fix-null-vs-is_err-checking-in-memory_tier_init.patch

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

------------------------------------------------------
From: Miaoqian Lin <[email protected]>
Subject: mm/demotion: fix NULL vs IS_ERR checking in memory_tier_init
Date: Thu, 10 Nov 2022 07:07:51 +0400

alloc_memory_type() returns error pointers on error instead of NULL. Use IS_ERR() to check the return value to fix this.

Fixes 7b88bda3761b ("mm/demotion/dax/kmem: set node's abstract distance to MEMTIER_DEFAULT_DAX_ADISTANCE")
Cc Aneesh Kumar K.V <[email protected]>
Cc Wei Xu <[email protected]>

---

 mm/memory-tiers.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/memory-tiers.c renamed from mm/memory-tiers.c~mm-demotion-fix-null-vs-is_err-checking-in-memory_tier_init +1 -1
@@ -645,7 +645,7 @@ static int __init memory_tier_init(void)
 	 * than default DRAM tier.
 	 */
 	default_dram_type = alloc_memory_type(MEMTIER_ADISTANCE_DRAM);
-	if (!default_dram_type)
+	if (IS_ERR(default_dram_type))
 		panic("%s() failed to allocate default DRAM tier\n", __func__);
 
 	/*

_

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