From: Yongqiang Yang <xiaoqiangnk@gmail.com>
To: tytso@mit.edu
Cc: linux-ext4@vger.kernel.org, Yongqiang Yang <xiaoqiangnk@gmail.com>
Subject: [PATCH 3/3] jbd2: use KMEM_CACHE instead of kmem_cache_create
Date: Sun, 13 Nov 2011 19:21:31 +0800 [thread overview]
Message-ID: <1321183291-4589-3-git-send-email-xiaoqiangnk@gmail.com> (raw)
In-Reply-To: <1321183291-4589-1-git-send-email-xiaoqiangnk@gmail.com>
This patch lets jbd2 use KMEM_CACHE instead of kmem_cache_create.
Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
---
fs/jbd2/revoke.c | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/fs/jbd2/revoke.c b/fs/jbd2/revoke.c
index 69fd935..1b67105 100644
--- a/fs/jbd2/revoke.c
+++ b/fs/jbd2/revoke.c
@@ -204,17 +204,13 @@ int __init jbd2_journal_init_revoke_caches(void)
J_ASSERT(!jbd2_revoke_record_cache);
J_ASSERT(!jbd2_revoke_table_cache);
- jbd2_revoke_record_cache = kmem_cache_create("jbd2_revoke_record",
- sizeof(struct jbd2_revoke_record_s),
- 0,
- SLAB_HWCACHE_ALIGN|SLAB_TEMPORARY,
- NULL);
+ jbd2_revoke_record_cache = KMEM_CACHE(jbd2_revoke_record_s,
+ SLAB_HWCACHE_ALIGN|SLAB_TEMPORARY);
if (!jbd2_revoke_record_cache)
goto record_cache_failure;
- jbd2_revoke_table_cache = kmem_cache_create("jbd2_revoke_table",
- sizeof(struct jbd2_revoke_table_s),
- 0, SLAB_TEMPORARY, NULL);
+ jbd2_revoke_table_cache = KMEM_CACHE(jbd2_revoke_table_s,
+ SLAB_TEMPORARY);
if (!jbd2_revoke_table_cache)
goto table_cache_failure;
return 0;
--
1.7.5.1
next prev parent reply other threads:[~2011-11-13 13:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-13 11:21 [PATCH 1/3] jbd2: allocate transaction from special cache Yongqiang Yang
2011-11-13 11:21 ` [PATCH 2/3] jbd2: rename functions initializing caches Yongqiang Yang
2012-02-13 22:10 ` Ted Ts'o
2011-11-13 11:21 ` Yongqiang Yang [this message]
2012-02-13 22:10 ` [PATCH 3/3] jbd2: use KMEM_CACHE instead of kmem_cache_create Ted Ts'o
2012-02-13 22:10 ` [PATCH 1/3] jbd2: allocate transaction from special cache Ted Ts'o
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=1321183291-4589-3-git-send-email-xiaoqiangnk@gmail.com \
--to=xiaoqiangnk@gmail.com \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/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;
as well as URLs for NNTP newsgroup(s).