diff options
| author | Kunwu Chan <[email protected]> | 2024-01-31 17:43:23 +0800 |
|---|---|---|
| committer | Jens Axboe <[email protected]> | 2024-02-08 11:29:40 -0700 |
| commit | 48ff13a618b54aabc447659a9016068cf0cae322 (patch) | |
| tree | 6b52027c61471c928c22f6afcde657eecc11b350 | |
| parent | e516c3fc6c182736aec5418a73f15199640491e2 (diff) | |
block: Simplify the allocation of slab caches
Use the new KMEM_CACHE() macro instead of direct kmem_cache_create
to simplify the creation of SLAB caches.
Signed-off-by: Kunwu Chan <[email protected]>
Reviewed-by: Johannes Thumshirn <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
| -rw-r--r-- | block/blk-core.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index 314c3065891a..2b11d8325fde 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -1232,8 +1232,7 @@ int __init blk_dev_init(void) if (!kblockd_workqueue) panic("Failed to create kblockd\n"); - blk_requestq_cachep = kmem_cache_create("request_queue", - sizeof(struct request_queue), 0, SLAB_PANIC, NULL); + blk_requestq_cachep = KMEM_CACHE(request_queue, SLAB_PANIC); blk_debugfs_root = debugfs_create_dir("block", NULL); |