diff options
Diffstat (limited to 'app-crypt/truecrypt/files/truecrypt-4.2a-2.6.20.patch')
-rw-r--r-- | app-crypt/truecrypt/files/truecrypt-4.2a-2.6.20.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/app-crypt/truecrypt/files/truecrypt-4.2a-2.6.20.patch b/app-crypt/truecrypt/files/truecrypt-4.2a-2.6.20.patch new file mode 100644 index 000000000000..fed9d5558089 --- /dev/null +++ b/app-crypt/truecrypt/files/truecrypt-4.2a-2.6.20.patch @@ -0,0 +1,31 @@ +--- Linux/Kernel/Dm-target.c.orig 2007-02-05 20:40:09.000000000 +0200 ++++ Linux/Kernel/Dm-target.c 2007-02-05 20:54:11.000000000 +0200 +@@ -383,9 +383,16 @@ + } + + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20) ++static void work_process (struct work_struct *work) ++{ ++ struct bio_ctx *bc = container_of(work, struct bio_ctx, work); ++ void *qdata = (void *)bc; ++#else + static void work_process (void *qdata) + { + struct bio_ctx *bc = (struct bio_ctx *) qdata; ++#endif + struct target_ctx *tc = (struct target_ctx *) bc->target->private; + struct bio_vec *bv; + u64 sec_no = bc->crypto_sector; +@@ -441,7 +448,11 @@ + bio_put (bio); + + // Queue decryption to leave completion interrupt ASAP ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20) ++ INIT_WORK (&bc->work, work_process); ++#else + INIT_WORK (&bc->work, work_process, bc); ++#endif + trace (3, "queue_work (%p)\n", work_queue); + queue_work (work_queue, &bc->work); + return error; |