diff options
author | Mike Snitzer <snitzer@redhat.com> | 2014-03-28 02:15:02 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-05-13 13:59:46 +0200 |
commit | e2e8845036f5cd4391fc753367604562c65d8008 (patch) | |
tree | 834e38a5d08ceb4a72f39073c322f2ce967e021a | |
parent | ff3296214ce60fb2215ef06143a773eb48a0e5d3 (diff) |
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>
-rw-r--r-- | drivers/md/dm-thin.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c index 901aac27e52..7d0ac0a6e72 100644 --- a/drivers/md/dm-thin.c +++ b/drivers/md/dm-thin.c @@ -1322,9 +1322,9 @@ static void process_deferred_bios(struct pool *pool) */ if (ensure_next_mapping(pool)) { spin_lock_irqsave(&pool->lock, flags); + bio_list_add(&pool->deferred_bios, bio); bio_list_merge(&pool->deferred_bios, &bios); spin_unlock_irqrestore(&pool->lock, flags); - break; } |