summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorMing Lei <ming.lei@redhat.com>2025-02-28 21:26:56 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-04-10 14:29:37 +0200
commit8d8e2c9961fae7dfbd8ae50a8d3daa3c79371610 (patch)
tree7fa5060ca7c0e8c775fea58d0c3ded670b9d5bcc /block
parentf6e43f6aeab440217c315216553648c59a9e3de0 (diff)
downloadlinux-8d8e2c9961fae7dfbd8ae50a8d3daa3c79371610.tar.gz
linux-8d8e2c9961fae7dfbd8ae50a8d3daa3c79371610.tar.bz2
linux-8d8e2c9961fae7dfbd8ae50a8d3daa3c79371610.zip
block: fix 'kmem_cache of name 'bio-108' already exists'
[ Upstream commit b654f7a51ffb386131de42aa98ed831f8c126546 ] Device mapper bioset often has big bio_slab size, which can be more than 1000, then 8byte can't hold the slab name any more, cause the kmem_cache allocation warning of 'kmem_cache of name 'bio-108' already exists'. Fix the warning by extending bio_slab->name to 12 bytes, but fix output of /proc/slabinfo Reported-by: Guangwu Zhang <guazhang@redhat.com> Signed-off-by: Ming Lei <ming.lei@redhat.com> Link: https://lore.kernel.org/r/20250228132656.2838008-1-ming.lei@redhat.com Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'block')
-rw-r--r--block/bio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/bio.c b/block/bio.c
index e3d3e75c97e0..239f6bd421a8 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -53,7 +53,7 @@ struct bio_slab {
struct kmem_cache *slab;
unsigned int slab_ref;
unsigned int slab_size;
- char name[8];
+ char name[12];
};
static DEFINE_MUTEX(bio_slab_lock);
static struct bio_slab *bio_slabs;