dm thin: fix missing pool reference count decrement in pool_ctr error path

This change “dm thin: fix missing pool reference count decrement in pool_ctr error path” in Linux kernel is authored by Mike Snitzer <snitzer [at] redhat.com> on Tue Oct 13 12:04:28 2015 -0400.

dm thin: fix missing pool reference count decrement in pool_ctr error path

Fixes: ac8c3f3df ("dm thin: generate event when metadata threshold passed")
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Cc: stable@vger.kernel.org # 3.10+

This Linux change may have been applied to various maintained Linux releases and you can find Linux releases including commit ba30670.

There are 2 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/md/dm-thin.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c
index 6fcbfb0..3897b90 100644
--- a/drivers/md/dm-thin.c
+++ b/drivers/md/dm-thin.c
@@ -3201,7 +3201,7 @@ static int pool_ctr(struct dm_target *ti, unsigned argc, char **argv)
 						metadata_low_callback,
 						pool);
 	if (r)
-		goto out_free_pt;
+		goto out_flags_changed;
 
 	pt->callbacks.congested_fn = pool_is_congested;
 	dm_table_add_target_callbacks(ti->table, &pt->callbacks);

The commit for this change in Linux stable tree is ba30670 (patch).

Leave a Reply

Your email address will not be published. Required fields are marked *