Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fe76cd88 authored by Mike Snitzer's avatar Mike Snitzer
Browse files

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: default avatarMike Snitzer <snitzer@redhat.com>
Acked-by: default avatarJoe Thornber <ejt@redhat.com>
Cc: stable@vger.kernel.org
parent a356e426
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
		}