diff options
-rw-r--r-- | drivers/md/dm-hw-handler.h | 1 | ||||
-rw-r--r-- | drivers/md/dm-mpath.c | 3 | ||||
-rw-r--r-- | drivers/md/dm.c | 1 |
3 files changed, 5 insertions, 0 deletions
diff --git a/drivers/md/dm-hw-handler.h b/drivers/md/dm-hw-handler.h index 32eff28e4adc..e0832e6fcf36 100644 --- a/drivers/md/dm-hw-handler.h +++ b/drivers/md/dm-hw-handler.h | |||
@@ -16,6 +16,7 @@ | |||
16 | struct hw_handler_type; | 16 | struct hw_handler_type; |
17 | struct hw_handler { | 17 | struct hw_handler { |
18 | struct hw_handler_type *type; | 18 | struct hw_handler_type *type; |
19 | struct mapped_device *md; | ||
19 | void *context; | 20 | void *context; |
20 | }; | 21 | }; |
21 | 22 | ||
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c index 3aa013506967..de54b39e6ffe 100644 --- a/drivers/md/dm-mpath.c +++ b/drivers/md/dm-mpath.c | |||
@@ -668,6 +668,9 @@ static int parse_hw_handler(struct arg_set *as, struct multipath *m) | |||
668 | return -EINVAL; | 668 | return -EINVAL; |
669 | } | 669 | } |
670 | 670 | ||
671 | m->hw_handler.md = dm_table_get_md(ti->table); | ||
672 | dm_put(m->hw_handler.md); | ||
673 | |||
671 | r = hwht->create(&m->hw_handler, hw_argc - 1, as->argv); | 674 | r = hwht->create(&m->hw_handler, hw_argc - 1, as->argv); |
672 | if (r) { | 675 | if (r) { |
673 | dm_put_hw_handler(hwht); | 676 | dm_put_hw_handler(hwht); |
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 11a98df298ec..2717a355dc5b 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c | |||
@@ -1236,6 +1236,7 @@ void dm_put(struct mapped_device *md) | |||
1236 | free_dev(md); | 1236 | free_dev(md); |
1237 | } | 1237 | } |
1238 | } | 1238 | } |
1239 | EXPORT_SYMBOL_GPL(dm_put); | ||
1239 | 1240 | ||
1240 | /* | 1241 | /* |
1241 | * Process the deferred bios | 1242 | * Process the deferred bios |