提交 5199766d 编写于 作者: C Chen Jun 提交者: Zhong Jinghua

mm/sharepool: use delete_spg_node to replace some repetitive code

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I650K6

--------------------------------

delete_spg_node can be use to replace the code snippets as follows:
list_del(&node->proc_node);
spg->proc_num--;
Signed-off-by: NChen Jun <chenjun102@huawei.com>
上级 8da9e85b
......@@ -1666,8 +1666,7 @@ int mg_sp_group_del_task(int tgid, int spg_id)
if (list_is_singular(&spg->procs))
is_alive = spg->is_alive = false;
spg->proc_num--;
list_del(&spg_node->proc_node);
delete_spg_node(spg, spg_node);
sp_group_put(spg);
up_write(&spg->rw_lock);
if (!is_alive)
......@@ -4151,8 +4150,7 @@ int sp_group_exit(void)
/* a dead group should NOT be reactive again */
if (spg_valid(spg) && list_is_singular(&spg->procs))
is_alive = spg->is_alive = false;
spg->proc_num--;
list_del(&spg_node->proc_node);
delete_spg_node(spg, spg_node);
up_write(&spg->rw_lock);
if (!is_alive)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部