Message ID | 20221024074232.151383-3-liushixin2@huawei.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | Refactor __kmem_cache_create() and fix memory leak | expand |
diff --git a/mm/slub.c b/mm/slub.c index 157527d7101b..ba94eb6fda78 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -5847,7 +5847,7 @@ static ssize_t slab_attr_store(struct kobject *kobj, return attribute->store(s, buf, len); } -static void kmem_cache_release(struct kobject *k) +static void slab_release(struct kobject *k) { slab_kmem_cache_release(to_slab(k)); } @@ -5859,7 +5859,7 @@ static const struct sysfs_ops slab_sysfs_ops = { static struct kobj_type slab_ktype = { .sysfs_ops = &slab_sysfs_ops, - .release = kmem_cache_release, + .release = slab_release, }; static struct kset *slab_kset;
The function name kmem_cache_release has been reused in slab_common.c and slub.c which is easy to misunderstand. Rename the kmem_cache_release to slab_release in slub.c to distinguish them. Signed-off-by: Liu Shixin <liushixin2@huawei.com> --- mm/slub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)