]> Git Repo - linux.git/commitdiff
libceph: use KMEM_CACHE macro
authorGeliang Tang <[email protected]>
Sun, 13 Mar 2016 07:18:39 +0000 (15:18 +0800)
committerIlya Dryomov <[email protected]>
Fri, 25 Mar 2016 17:51:57 +0000 (18:51 +0100)
Use KMEM_CACHE() instead of kmem_cache_create() to simplify the code.

Signed-off-by: Geliang Tang <[email protected]>
Signed-off-by: Ilya Dryomov <[email protected]>
net/ceph/messenger.c

index d9681bc839c7b1cea1a04b2742fb05b6ca3a9ac1..1831f63536225bbe120dbc5215b26d2d6518f3fb 100644 (file)
@@ -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;
 
This page took 0.065243 seconds and 4 git commands to generate.