Blob Blame History Raw
From: Jeff Mahoney <jeffm@suse.com>
Subject: [PATCH] dm-raid45: API update: Remove dm_put after dm_table_get_md
References: bnc#615656
Patch-mainline: depends on dm-raid45 being upstream

 Commit ecdb2e257abc33ae6798d3ccba87bdafa40ef6b6, for 2.6.34, removed
 the dm_get() call from dm_table_get_md(). The dm-raid45 code still has
 matching dm_put() calls for the dm_table_get_md() calls. This patch removes
 the dm_put() calls as it's causing too many reference drops and BUG_ONs.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
---
 drivers/md/dm-raid45.c |    4 ----
 1 file changed, 4 deletions(-)

 drivers/md/dm-raid45.c |    4 ----
 1 file changed, 4 deletions(-)

--- a/drivers/md/dm-raid45.c
+++ b/drivers/md/dm-raid45.c
@@ -1567,7 +1567,6 @@ static int sc_init(struct raid_set *rs,
 	disk = dm_disk(md);
 	snprintf(sc->kc.name, sizeof(sc->kc.name), "%s-%d.%d", TARGET,
 		 disk->first_minor, atomic_inc_return(&_stripe_sc_nr));
-	dm_put(md);
 	sc->kc.cache = kmem_cache_create(sc->kc.name, stripe_size(rs),
 					 0, 0, NULL);
 	if (!sc->kc.cache)
@@ -3981,8 +3980,6 @@ static void rs_set_read_ahead(struct rai
 			q->backing_dev_info.ra_pages = ra_pages;
 		}
 	}
-
-	dm_put(md);
 }
 
 /* Set congested function. */
@@ -3994,7 +3991,6 @@ static void rs_set_congested_fn(struct r
 	/* Set congested function and data. */
 	bdi->congested_fn = rs_congested;
 	bdi->congested_data = rs;
-	dm_put(md);
 }
 
 /*