]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
dm: free table mempools if not used in __bind
authorBenjamin Marzinski <bmarzins@redhat.com>
Thu, 10 Apr 2025 19:49:39 +0000 (15:49 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2025 10:07:14 +0000 (11:07 +0100)
commit08f2c0a46ac1de69f0364e4facbf751a746aa16d
treea6a971937ede6787cf0568cb396e5a8fbf74419e
parent44133e7ba86ae253ea365416e68f41235e127afb
dm: free table mempools if not used in __bind

[ Upstream commit e8819e7f03470c5b468720630d9e4e1d5b99159e ]

With request-based dm, the mempools don't need reloading when switching
tables, but the unused table mempools are not freed until the active
table is finally freed. Free them immediately if they are not needed.

Fixes: 29dec90a0f1d9 ("dm: fix bio_set allocation")
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Tested-by: Damien Le Moal <dlemoal@kernel.org>
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/md/dm.c