Commit 81ce2ebd authored by lvqian's avatar lvqian Committed by Vlastimil Babka

mm/slab.c: cleanup is_debug_pagealloc_cache()

Remove the if statement to increase code readability.
Also make the function inline, per David.
Signed-off-by: default avatarlvqian <lvqian@nfschina.com>
Acked-by: default avatarDavid Rientjes <rientjes@google.com>
Signed-off-by: default avatarVlastimil Babka <vbabka@suse.cz>
parent c034c6a4
......@@ -1410,13 +1410,10 @@ static void kmem_rcu_free(struct rcu_head *head)
}
#if DEBUG
static bool is_debug_pagealloc_cache(struct kmem_cache *cachep)
static inline bool is_debug_pagealloc_cache(struct kmem_cache *cachep)
{
if (debug_pagealloc_enabled_static() && OFF_SLAB(cachep) &&
(cachep->size % PAGE_SIZE) == 0)
return true;
return false;
return debug_pagealloc_enabled_static() && OFF_SLAB(cachep) &&
((cachep->size % PAGE_SIZE) == 0);
}
#ifdef CONFIG_DEBUG_PAGEALLOC
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment