diff options
Diffstat (limited to 'drivers/md/dm-mpath.c')
-rw-r--r-- | drivers/md/dm-mpath.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c index 2ee5e357a0a7..07cfef67c0ba 100644 --- a/drivers/md/dm-mpath.c +++ b/drivers/md/dm-mpath.c | |||
@@ -544,8 +544,23 @@ static int multipath_clone_and_map(struct dm_target *ti, struct request *rq, | |||
544 | return DM_MAPIO_REMAPPED; | 544 | return DM_MAPIO_REMAPPED; |
545 | } | 545 | } |
546 | 546 | ||
547 | static void multipath_release_clone(struct request *clone) | 547 | static void multipath_release_clone(struct request *clone, |
548 | union map_info *map_context) | ||
548 | { | 549 | { |
550 | if (unlikely(map_context)) { | ||
551 | /* | ||
552 | * non-NULL map_context means caller is still map | ||
553 | * method; must undo multipath_clone_and_map() | ||
554 | */ | ||
555 | struct dm_mpath_io *mpio = get_mpio(map_context); | ||
556 | struct pgpath *pgpath = mpio->pgpath; | ||
557 | |||
558 | if (pgpath && pgpath->pg->ps.type->end_io) | ||
559 | pgpath->pg->ps.type->end_io(&pgpath->pg->ps, | ||
560 | &pgpath->path, | ||
561 | mpio->nr_bytes); | ||
562 | } | ||
563 | |||
549 | blk_put_request(clone); | 564 | blk_put_request(clone); |
550 | } | 565 | } |
551 | 566 | ||