Skip to contentSkip to conversation

mm/slub: page is always non-NULL for node_match()

PATCH In review Wei Yang 2 participants 2 messages Nov 6, 2018

Subsystems (2)
lore
Share & tools
lore

Wei Yang

author
#0 lore raw

PATCH 1/1 mm/slub: page is always non-NULL for node_match()

node_match() is a static function and only invoked in slub.c.

In all three places, page is ensured to be valid.

---
 mm/slub.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/slub.c +1 -1
index 90d26063be68..af8bea511855 100644
@@ -2365,7 +2365,7 @@ static int slub_cpu_dead(unsigned int cpu)
 static inline int node_match(struct page *page, int node)
 {
 #ifdef CONFIG_NUMA
-	if (!page || (node != NUMA_NO_NODE && page_to_nid(page) != node))
+	if (node != NUMA_NO_NODE && page_to_nid(page) != node)
 		return 0;
 #endif
 	return 1;
Signature · 1 line
2.15.1