From: Mike Snitzer Date: Fri, 28 Mar 2014 06:15:02 +0000 (-0400) Subject: dm thin: fix dangling bio in process_deferred_bios error path X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fe76cd88e654124d1431bb662a0fc6e99ca811a5;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git dm thin: fix dangling bio in process_deferred_bios error path 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 Acked-by: Joe Thornber Cc: stable@vger.kernel.org --- diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c index be70d38745f7..60cc50685c14 100644 --- a/drivers/md/dm-thin.c +++ b/drivers/md/dm-thin.c @@ -1392,9 +1392,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; }