dm thin: fix dangling bio in process_deferred_bios error path
authorMike Snitzer <snitzer@redhat.com>
Fri, 28 Mar 2014 06:15:02 +0000 (02:15 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 May 2014 11:59:46 +0000 (13:59 +0200)
commite2e8845036f5cd4391fc753367604562c65d8008
tree834e38a5d08ceb4a72f39073c322f2ce967e021a
parentff3296214ce60fb2215ef06143a773eb48a0e5d3
dm thin: fix dangling bio in process_deferred_bios error path

commit fe76cd88e654124d1431bb662a0fc6e99ca811a5 upstream.

If unable to ensure_next_mapping() we must add the current bio, which
was removed from the @bios list via bio_list_pop, back to the
deferred_bios list before all the remaining @bios.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Acked-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/dm-thin.c