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 12:11:32 +0000 (14:11 +0200)
commit53b67ae8d3d01efbdfd7ae431d8d46cba70084b9
treeba99052e5ad2a0d44b2b2dda74d715be3ce5793e
parentb4e472edda0a5993ede690aca9a3fa3d8750c5f2
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