summaryrefslogtreecommitdiff
path: root/kernel/events
diff options
context:
space:
mode:
authorKan Liang <kan.liang@linux.intel.com>2020-07-03 05:49:24 -0700
committerPeter Zijlstra <peterz@infradead.org>2020-07-08 11:38:55 +0200
commit5a09928d339f3cf0973991ddc3a2798825c84c99 (patch)
treefbbd258f30da8487ac700e41be693bfd5f451bd8 /kernel/events
parent33cad284497cf40f55ad6029c06011de3538ebed (diff)
perf/x86: Remove task_ctx_size
A new kmem_cache method has replaced the kzalloc() to allocate the PMU specific data. The task_ctx_size is not required anymore. Signed-off-by: Kan Liang <kan.liang@linux.intel.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/1593780569-62993-19-git-send-email-kan.liang@linux.intel.com
Diffstat (limited to 'kernel/events')
-rw-r--r--kernel/events/core.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/kernel/events/core.c b/kernel/events/core.c
index 30d9b3182369..7c436d705fbd 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -1243,15 +1243,13 @@ static void *alloc_task_ctx_data(struct pmu *pmu)
if (pmu->task_ctx_cache)
return kmem_cache_zalloc(pmu->task_ctx_cache, GFP_KERNEL);
- return kzalloc(pmu->task_ctx_size, GFP_KERNEL);
+ return NULL;
}
static void free_task_ctx_data(struct pmu *pmu, void *task_ctx_data)
{
if (pmu->task_ctx_cache && task_ctx_data)
kmem_cache_free(pmu->task_ctx_cache, task_ctx_data);
- else
- kfree(task_ctx_data);
}
static void free_ctx(struct rcu_head *head)