summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeliang Tang <geliangtang@163.com>2016-03-13 15:17:32 +0800
committerIlya Dryomov <idryomov@gmail.com>2016-03-25 18:51:56 +0100
commit03d9440676163e965cb77d03c102b461d8ccb482 (patch)
treec88ddbc3309aa5f6b24e82f709715ce7fe8c9baa
parent200fd27c8fa2ba8bb4529033967b69a7cbfa2c2e (diff)
downloadop-kernel-dev-03d9440676163e965cb77d03c102b461d8ccb482.zip
op-kernel-dev-03d9440676163e965cb77d03c102b461d8ccb482.tar.gz
rbd: 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>
-rw-r--r--drivers/block/rbd.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 0801871..9c62344 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -5641,18 +5641,12 @@ static void rbd_sysfs_cleanup(void)
static int rbd_slab_init(void)
{
rbd_assert(!rbd_img_request_cache);
- rbd_img_request_cache = kmem_cache_create("rbd_img_request",
- sizeof (struct rbd_img_request),
- __alignof__(struct rbd_img_request),
- 0, NULL);
+ rbd_img_request_cache = KMEM_CACHE(rbd_img_request, 0);
if (!rbd_img_request_cache)
return -ENOMEM;
rbd_assert(!rbd_obj_request_cache);
- rbd_obj_request_cache = kmem_cache_create("rbd_obj_request",
- sizeof (struct rbd_obj_request),
- __alignof__(struct rbd_obj_request),
- 0, NULL);
+ rbd_obj_request_cache = KMEM_CACHE(rbd_obj_request, 0);
if (!rbd_obj_request_cache)
goto out_err;
OpenPOWER on IntegriCloud