]> git.hungrycats.org Git - linux/commit
dm-bufio: fix warnings about duplicate slab caches
authorMikulas Patocka <mpatocka@redhat.com>
Mon, 11 Nov 2024 15:48:18 +0000 (16:48 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Dec 2024 12:54:07 +0000 (13:54 +0100)
commit368b7ec0ce88e94f7f071f73c3d00dbba5220f9a
tree81e234200bc4d7752940771743fb864fcf410789
parent8f0ec8f21bc96b075571532ca41568b72525976f
dm-bufio: fix warnings about duplicate slab caches

commit 42964e4b5e3ac95090bdd23ed7da2a941ccd902c upstream.

The commit 4c39529663b9 adds a warning about duplicate cache names if
CONFIG_DEBUG_VM is selected. These warnings are triggered by the dm-bufio
code. The dm-bufio code allocates a slab cache with each client. It is
not possible to preallocate the caches in the module init function
because the size of auxiliary per-buffer data is not known at this point.

So, this commit changes dm-bufio so that it appends a unique atomic value
to the cache name, to avoid the warnings.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Fixes: 4c39529663b9 ("slab: Warn on duplicate cache names when DEBUG_VM=y")
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/dm-bufio.c