From: Wei Yang <richard.weiyang@gmail.com>
To: cl@linux.com, penberg@kernel.org
Cc: akpm@linux-foundation.org, linux-mm@kvack.org,
Wei Yang <richard.weiyang@gmail.com>
Subject: [PATCH] mm/slub: page is always non-NULL for node_match()
Date: Tue, 6 Nov 2018 23:02:45 +0800 [thread overview]
Message-ID: <20181106150245.1668-1-richard.weiyang@gmail.com> (raw)
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(-)
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;
--
2.15.1
next reply other threads:[~2018-11-06 15:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-06 15:02 Wei Yang [this message]
2018-11-06 15:56 ` Christopher Lameter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181106150245.1668-1-richard.weiyang@gmail.com \
--to=richard.weiyang@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=linux-mm@kvack.org \
--cc=penberg@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox