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 --- 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 f0e3cd26076e..55f3a00971a5 100644 --- a/mm/share_pool.c +++ b/mm/share_pool.c @@ -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)