diff options
-rw-r--r-- | drivers/md/dm-table.c | 2 | ||||
-rw-r--r-- | drivers/md/dm-uevent.c | 7 | ||||
-rw-r--r-- | drivers/md/dm.c | 14 |
3 files changed, 4 insertions, 19 deletions
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c index 4b22feb01a0c..7d70cca585ac 100644 --- a/drivers/md/dm-table.c +++ b/drivers/md/dm-table.c | |||
@@ -1231,8 +1231,6 @@ void dm_table_unplug_all(struct dm_table *t) | |||
1231 | 1231 | ||
1232 | struct mapped_device *dm_table_get_md(struct dm_table *t) | 1232 | struct mapped_device *dm_table_get_md(struct dm_table *t) |
1233 | { | 1233 | { |
1234 | dm_get(t->md); | ||
1235 | |||
1236 | return t->md; | 1234 | return t->md; |
1237 | } | 1235 | } |
1238 | 1236 | ||
diff --git a/drivers/md/dm-uevent.c b/drivers/md/dm-uevent.c index c7c555a8c7b2..6b1e3b61b25e 100644 --- a/drivers/md/dm-uevent.c +++ b/drivers/md/dm-uevent.c | |||
@@ -187,7 +187,7 @@ void dm_path_uevent(enum dm_uevent_type event_type, struct dm_target *ti, | |||
187 | 187 | ||
188 | if (event_type >= ARRAY_SIZE(_dm_uevent_type_names)) { | 188 | if (event_type >= ARRAY_SIZE(_dm_uevent_type_names)) { |
189 | DMERR("%s: Invalid event_type %d", __func__, event_type); | 189 | DMERR("%s: Invalid event_type %d", __func__, event_type); |
190 | goto out; | 190 | return; |
191 | } | 191 | } |
192 | 192 | ||
193 | event = dm_build_path_uevent(md, ti, | 193 | event = dm_build_path_uevent(md, ti, |
@@ -195,12 +195,9 @@ void dm_path_uevent(enum dm_uevent_type event_type, struct dm_target *ti, | |||
195 | _dm_uevent_type_names[event_type].name, | 195 | _dm_uevent_type_names[event_type].name, |
196 | path, nr_valid_paths); | 196 | path, nr_valid_paths); |
197 | if (IS_ERR(event)) | 197 | if (IS_ERR(event)) |
198 | goto out; | 198 | return; |
199 | 199 | ||
200 | dm_uevent_add(md, &event->elist); | 200 | dm_uevent_add(md, &event->elist); |
201 | |||
202 | out: | ||
203 | dm_put(md); | ||
204 | } | 201 | } |
205 | EXPORT_SYMBOL_GPL(dm_path_uevent); | 202 | EXPORT_SYMBOL_GPL(dm_path_uevent); |
206 | 203 | ||
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index aa4e2aa86d49..21222f5193fb 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c | |||
@@ -2699,23 +2699,13 @@ int dm_suspended_md(struct mapped_device *md) | |||
2699 | 2699 | ||
2700 | int dm_suspended(struct dm_target *ti) | 2700 | int dm_suspended(struct dm_target *ti) |
2701 | { | 2701 | { |
2702 | struct mapped_device *md = dm_table_get_md(ti->table); | 2702 | return dm_suspended_md(dm_table_get_md(ti->table)); |
2703 | int r = dm_suspended_md(md); | ||
2704 | |||
2705 | dm_put(md); | ||
2706 | |||
2707 | return r; | ||
2708 | } | 2703 | } |
2709 | EXPORT_SYMBOL_GPL(dm_suspended); | 2704 | EXPORT_SYMBOL_GPL(dm_suspended); |
2710 | 2705 | ||
2711 | int dm_noflush_suspending(struct dm_target *ti) | 2706 | int dm_noflush_suspending(struct dm_target *ti) |
2712 | { | 2707 | { |
2713 | struct mapped_device *md = dm_table_get_md(ti->table); | 2708 | return __noflush_suspending(dm_table_get_md(ti->table)); |
2714 | int r = __noflush_suspending(md); | ||
2715 | |||
2716 | dm_put(md); | ||
2717 | |||
2718 | return r; | ||
2719 | } | 2709 | } |
2720 | EXPORT_SYMBOL_GPL(dm_noflush_suspending); | 2710 | EXPORT_SYMBOL_GPL(dm_noflush_suspending); |
2721 | 2711 | ||