From: Chen Jun chenjun102@huawei.com
Offering: HULK 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: Chen Jun chenjun102@huawei.com Signed-off-by: Zhang Zekun zhangzekun11@huawei.com Reviewed-by: Weilong Chen chenweilong@huawei.com --- mm/share_pool.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/mm/share_pool.c b/mm/share_pool.c index ababe279c44d..9c3df7b64ae5 100644 --- a/mm/share_pool.c +++ b/mm/share_pool.c @@ -1672,8 +1672,7 @@ int mg_sp_group_del_task(int tgid, int spg_id) down_write(&spg->rw_lock); 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_drop(spg); up_write(&spg->rw_lock); if (!is_alive) @@ -4318,8 +4317,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)