diff mbox

dm_crypt: Issue all previous bios before remapping barrier bio

Message ID 201002012049.27132.knikanth@suse.de (mailing list archive)
State Rejected, archived
Delegated to: Alasdair Kergon
Headers show

Commit Message

Nikanth Karthikesan Feb. 1, 2010, 3:19 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c
index a936372..be68e70 100644
--- a/drivers/md/dm-crypt.c
+++ b/drivers/md/dm-crypt.c
@@ -1252,6 +1252,7 @@  static int crypt_map(struct dm_target *ti, struct bio *bio,
 
 	if (unlikely(bio_empty_barrier(bio))) {
 		cc = ti->private;
+		flush_workqueue(cc->io_queue);
 		bio->bi_bdev = cc->dev->bdev;
 		return DM_MAPIO_REMAPPED;
 	}