mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
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: lvqian <lvqian@nfschina.com> Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
This commit is contained in:
parent
c034c6a45c
commit
81ce2ebd19
1 changed files with 3 additions and 6 deletions
|
@ -1410,13 +1410,10 @@ static void kmem_rcu_free(struct rcu_head *head)
|
||||||
}
|
}
|
||||||
|
|
||||||
#if DEBUG
|
#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) &&
|
return debug_pagealloc_enabled_static() && OFF_SLAB(cachep) &&
|
||||||
(cachep->size % PAGE_SIZE) == 0)
|
((cachep->size % PAGE_SIZE) == 0);
|
||||||
return true;
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_PAGEALLOC
|
#ifdef CONFIG_DEBUG_PAGEALLOC
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue