2020-06-17 07:56:30

by Yi Wang

[permalink] [raw]
Subject: [PATCH] sched: Use kmem_cache_zalloc() instead of kmem_cache_alloc() with flag GFP_ZERO.

From: Liao Pingfang <[email protected]>

Use kmem_cache_zalloc instead of calling kmem_cache_alloc
with flag GFP_ZERO.

Signed-off-by: Liao Pingfang <[email protected]>
---
kernel/sched/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 8f36032..5aac3ca 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -7024,7 +7024,7 @@ struct task_group *sched_create_group(struct task_group *parent)
{
struct task_group *tg;

- tg = kmem_cache_alloc(task_group_cache, GFP_KERNEL | __GFP_ZERO);
+ tg = kmem_cache_zalloc(task_group_cache, GFP_KERNEL);
if (!tg)
return ERR_PTR(-ENOMEM);

--
2.9.5