* [PATCH 1/1] block: use KMEM_CACHE instead of kmem_cache_create
@ 2025-09-02 3:32 Longlong Xia
2025-09-02 5:37 ` Christoph Hellwig
0 siblings, 1 reply; 2+ messages in thread
From: Longlong Xia @ 2025-09-02 3:32 UTC (permalink / raw)
To: axboe; +Cc: linux-block, linux-kernel, Longlong Xia
Use KMEM_CACHE() instead of kmem_cache_create() to simplify the code.
Signed-off-by: Longlong Xia <xialonglong@kylinos.cn>
---
block/bio-integrity-auto.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/block/bio-integrity-auto.c b/block/bio-integrity-auto.c
index 687952f63bbb..167cdc6f5920 100644
--- a/block/bio-integrity-auto.c
+++ b/block/bio-integrity-auto.c
@@ -203,9 +203,7 @@ void blk_flush_integrity(void)
static int __init blk_integrity_auto_init(void)
{
- bid_slab = kmem_cache_create("bio_integrity_data",
- sizeof(struct bio_integrity_data), 0,
- SLAB_HWCACHE_ALIGN | SLAB_PANIC, NULL);
+ bid_slab = KMEM_CACHE(bio_integrity_data, SLAB_HWCACHE_ALIGN | SLAB_PANIC);
if (mempool_init_slab_pool(&bid_pool, BIO_POOL_SIZE, bid_slab))
panic("bio: can't create integrity pool\n");
--
2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-09-02 5:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-02 3:32 [PATCH 1/1] block: use KMEM_CACHE instead of kmem_cache_create Longlong Xia
2025-09-02 5:37 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®