linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Liu Shixin <liushixin2@huawei.com>
To: Christoph Lameter <cl@linux.com>,
	Pekka Enberg <penberg@kernel.org>,
	"David Rientjes" <rientjes@google.com>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	Vlastimil Babka <vbabka@suse.cz>,
	"Roman Gushchin" <roman.gushchin@linux.dev>,
	Hyeonggon Yoo <42.hyeyoo@gmail.com>
Cc: <linux-mm@kvack.org>, <linux-kernel@vger.kernel.org>,
	Liu Shixin <liushixin2@huawei.com>
Subject: [PATCH 2/4] mm/slub: rename kmem_cache_release to slab_release in slub.c
Date: Mon, 24 Oct 2022 15:42:30 +0800	[thread overview]
Message-ID: <20221024074232.151383-3-liushixin2@huawei.com> (raw)
In-Reply-To: <20221024074232.151383-1-liushixin2@huawei.com>

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(-)

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;
-- 
2.25.1



  parent reply	other threads:[~2022-10-24  6:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-24  7:42 [PATCH 0/4] Refactor __kmem_cache_create() and fix memory leak Liu Shixin
2022-10-24  7:42 ` [PATCH 1/4] mm/slab_common: Move cache_name to create_cache() Liu Shixin
2022-10-24  7:42 ` Liu Shixin [this message]
2022-10-24  7:42 ` [PATCH 3/4] mm/slab_common: Separate sysfs_slab_add() and debugfs_slab_add() from __kmem_cache_create() Liu Shixin
2022-10-24  8:16   ` kernel test robot
2022-10-24 20:23   ` kernel test robot
2022-10-25  8:01   ` kernel test robot
2022-10-24  7:42 ` [PATCH 4/4] mm/slab_common: Fix memory leak of kobj->name in sysfs_slab_add() Liu Shixin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221024074232.151383-3-liushixin2@huawei.com \
    --to=liushixin2@huawei.com \
    --cc=42.hyeyoo@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=penberg@kernel.org \
    --cc=rientjes@google.com \
    --cc=roman.gushchin@linux.dev \
    --cc=vbabka@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox