hulk inclusion category: cleanup bugzilla: https://atomgit.com/openeuler/kernel/issues/8424 ---------------------------------------- Refactor 'alloc_ctx_from_vstream' to strictly perform context allocation without attempting to find an existing one first. Previously, this function would check for an existing context by TGID and return early if found. However, the lookup logic is now the responsibility of the caller, who ensures this function is only invoked when a context is genuinely missing. Removing the internal lookup ensures the function behavior aligns with its name—pure allocation—and prevents redundant searches. Signed-off-by: Liu Kai <liukai284@huawei.com> --- kernel/xsched/vstream.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/kernel/xsched/vstream.c b/kernel/xsched/vstream.c index b39e97682dfb..46710d3ce1d0 100644 --- a/kernel/xsched/vstream.c +++ b/kernel/xsched/vstream.c @@ -223,10 +223,6 @@ static int alloc_ctx_from_vstream(struct vstream_info *vstream_info, struct xsched_cu *xcu = vstream_info->xcu; int ret; - *ctx = ctx_find_by_tgid_and_xcu(vstream_info->tgid, xcu); - if (*ctx) - return 0; - *ctx = kzalloc(sizeof(struct xsched_context), GFP_KERNEL); if (!*ctx) { XSCHED_ERR("Fail to alloc xsched context (tgid=%d) @ %s\n", -- 2.34.1