From: Milan Broz <[email-masked]>

Move processing of write bio to io thread.

[Bug report perhaps in this patch:
 lkml Subject: 2.6.24-rc2-mm1: kcryptd vs lockdep]

Signed-off-by: Milan Broz <[email-masked]>
---
 drivers/md/dm-crypt.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletion(-)

Index: linux-2.6.24-rc3/drivers/md/dm-crypt.c
===================================================================
--- linux-2.6.24-rc3.orig/drivers/md/dm-crypt.c	2007-12-07 02:52:47.000000000 +0000
+++ linux-2.6.24-rc3/drivers/md/dm-crypt.c	2007-12-07 02:52:55.000000000 +0000
@@ -570,6 +570,9 @@ static void kcryptd_io_read(struct dm_cr
 
 static void kcryptd_io_write(struct dm_crypt_io *io)
 {
+	struct bio *clone = io->ctx.bio_out;
+
+	generic_make_request(clone);
 }
 
 static void kcryptd_io(struct work_struct *work)
@@ -609,7 +612,7 @@ static void kcryptd_crypt_write_io_submi
 	io->sector += bio_sectors(clone);
 
 	atomic_inc(&io->pending);
-	generic_make_request(clone);
+	kcryptd_queue_io(io);
 }
 
 static void kcryptd_crypt_write_convert_loop(struct dm_crypt_io *io)