summaryrefslogtreecommitdiff
path: root/net/ceph
diff options
context:
space:
mode:
authorGeliang Tang <geliangtang@163.com>2016-03-13 15:18:39 +0800
committerIlya Dryomov <idryomov@gmail.com>2016-03-25 18:51:57 +0100
commit5ee61e95b6b33c82f6fa1382585faed66aa01245 (patch)
tree9bb4d4290f54c2796019a58bc7c1a517af1f31e8 /net/ceph
parent99ec269779f1fde25356e14299419551cdb54443 (diff)
libceph: use KMEM_CACHE macro
Use KMEM_CACHE() instead of kmem_cache_create() to simplify the code. Signed-off-by: Geliang Tang <geliangtang@163.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'net/ceph')
-rw-r--r--net/ceph/messenger.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
index d9681bc839c7..1831f6353622 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -235,18 +235,12 @@ static struct workqueue_struct *ceph_msgr_wq;
static int ceph_msgr_slab_init(void)
{
BUG_ON(ceph_msg_cache);
- ceph_msg_cache = kmem_cache_create("ceph_msg",
- sizeof (struct ceph_msg),
- __alignof__(struct ceph_msg), 0, NULL);
-
+ ceph_msg_cache = KMEM_CACHE(ceph_msg, 0);
if (!ceph_msg_cache)
return -ENOMEM;
BUG_ON(ceph_msg_data_cache);
- ceph_msg_data_cache = kmem_cache_create("ceph_msg_data",
- sizeof (struct ceph_msg_data),
- __alignof__(struct ceph_msg_data),
- 0, NULL);
+ ceph_msg_data_cache = KMEM_CACHE(ceph_msg_data, 0);
if (ceph_msg_data_cache)
return 0;