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

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
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -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