Skip to content

Commit

Permalink
dm: clear bi_end_io on remapping failure
Browse files Browse the repository at this point in the history
As a precaution, set bi_end_io to NULL when failing to remap.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
  • Loading branch information
Hannes Reinecke authored and Alasdair G Kergon committed Mar 28, 2012
1 parent 574ce07 commit 4d7b38b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/md/dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1016,6 +1016,7 @@ static void __map_bio(struct dm_target *ti, struct bio *clone,
/*
* Store bio_set for cleanup.
*/
clone->bi_end_io = NULL;
clone->bi_private = md->bs;
bio_put(clone);
free_tio(md, tio);
Expand Down

0 comments on commit 4d7b38b

Please sign in to comment.