summaryrefslogtreecommitdiff
path: root/truecrypt/truecrypt-4.3a-2.6.24.patch
blob: eec4aa8bdb9a6a313e545f6b6c8e93cf7fe996e8 (plain)
    1 diff -Nrup a/Linux/Kernel/Dm-target.c b/Linux/Kernel/Dm-target.c
    2 --- a/Linux/Kernel/Dm-target.c	2007-04-24 18:32:06.000000000 +0200
    3 +++ b/Linux/Kernel/Dm-target.c	2007-12-22 15:07:56.000000000 +0100
    4 @@ -375,7 +375,11 @@ static void dereference_bio_ctx (struct 
    5  	if (!atomic_dec_and_test (&bc->ref_count))
    6  		return;
    7  
    8 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
    9  	bio_endio (bc->orig_bio, bc->orig_bio->bi_size, bc->error);
   10 +#else
   11 +	bio_endio (bc->orig_bio, bc->error);
   12 +#endif
   13  	mempool_free (bc, tc->bio_ctx_pool);
   14  }
   15  
   16 @@ -417,24 +421,35 @@ static void work_process (void *qdata)
   17  }
   18  
   19  
   20 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
   21  static int truecrypt_endio (struct bio *bio, unsigned int bytes_done, int error)
   22 +#else
   23 +static int truecrypt_endio (struct bio *bio, int error)
   24 +#endif
   25  {
   26  	struct bio_ctx *bc = (struct bio_ctx *) bio->bi_private;
   27  	struct target_ctx *tc = (struct target_ctx *) bc->target->private;
   28  	struct bio_vec *bv;
   29  	int seg_no;
   30  	
   31 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
   32  	trace (1, "end: sc=%llu fl=%ld rw=%ld sz=%d ix=%hd vc=%hd dn=%d er=%d\n",
   33  		(unsigned long long) bio->bi_sector, bio->bi_flags, bio->bi_rw, bio->bi_size, bio->bi_idx, bio->bi_vcnt, bytes_done, error);
   34 +#else
   35 +	trace (1, "end: sc=%llu fl=%ld sz=%ld rw=%ld ix=%hd vc=%hd er=%d\n",
   36 +		(unsigned long long) bio->bi_sector, bio->bi_flags, bio->bi_size, bio->bi_rw, bio->bi_idx, bio->bi_vcnt, error);
   37 +#endif
   38  
   39  	if (error != 0)
   40  		bc->error = error;
   41  
   42 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
   43  	if (bio->bi_size)
   44  	{
   45  		trace (2, "Outstanding IO: %d\n", bio->bi_size);
   46  		return 1;
   47  	}
   48 +#endif
   49  
   50  	if (bio_data_dir (bio) == READ)
   51  	{

Generated by cgit