]> www.infradead.org Git - users/jedix/linux-maple.git/commit
dm space map metadata: fix occasional leak of a metadata block on resize
authorJoe Thornber <ejt@redhat.com>
Wed, 17 Jun 2015 12:35:19 +0000 (13:35 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 3 Aug 2015 16:29:06 +0000 (09:29 -0700)
commit0cb6b5abbc5f4a4e237c9c42c4a5014217038891
tree85ce7bdb568f77e8576d4c7e8e1f6aa5555cd4ac
parent3198d36127dc9015017926b4d905cc62de962f90
dm space map metadata: fix occasional leak of a metadata block on resize

commit 6096d91af0b65a3967139b32d5adbb3647858a26 upstream.

The metadata space map has a simplified 'bootstrap' mode that is
operational when extending the space maps.  Whilst in this mode it's
possible for some refcount decrement operations to become queued (eg, as
a result of shadowing one of the bitmap indexes).  These decrements were
not being applied when switching out of bootstrap mode.

The effect of this bug was the leaking of a 4k metadata block.  This is
detected by the latest version of thin_check as a non fatal error.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/persistent-data/dm-space-map-metadata.c