diff mbox series

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

Message ID 20181106150245.1668-1-richard.weiyang@gmail.com (mailing list archive)
State New, archived
Headers show
Series mm/slub: page is always non-NULL for node_match() | expand

Commit Message

Wei Yang Nov. 6, 2018, 3:02 p.m. UTC
node_match() is a static function and only invoked in slub.c.

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

Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
---
 mm/slub.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Christoph Lameter (Ampere) Nov. 6, 2018, 3:56 p.m. UTC | #1
Acked-by: Christoph Lameter <cl@linux.com>
diff mbox series

Patch

diff --git a/mm/slub.c b/mm/slub.c
index 90d26063be68..af8bea511855 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -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;