Lines 375-381
static void dereference_bio_ctx (struct
Link Here
|
375 |
if (!atomic_dec_and_test (&bc->ref_count)) |
375 |
if (!atomic_dec_and_test (&bc->ref_count)) |
376 |
return; |
376 |
return; |
377 |
|
377 |
|
|
|
378 |
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24) |
378 |
bio_endio (bc->orig_bio, bc->orig_bio->bi_size, bc->error); |
379 |
bio_endio (bc->orig_bio, bc->orig_bio->bi_size, bc->error); |
|
|
380 |
#else |
381 |
bio_endio (bc->orig_bio, bc->orig_bio->bi_size); |
382 |
#endif |
383 |
|
379 |
mempool_free (bc, tc->bio_ctx_pool); |
384 |
mempool_free (bc, tc->bio_ctx_pool); |
380 |
} |
385 |
} |
381 |
|
386 |
|
Lines 656-662
int __init dm_truecrypt_init(void)
Link Here
|
656 |
goto err; |
661 |
goto err; |
657 |
} |
662 |
} |
658 |
|
663 |
|
|
|
664 |
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23) |
659 |
bio_ctx_cache = kmem_cache_create ("truecrypt-bioctx", sizeof (struct bio_ctx), 0, 0, NULL, NULL); |
665 |
bio_ctx_cache = kmem_cache_create ("truecrypt-bioctx", sizeof (struct bio_ctx), 0, 0, NULL, NULL); |
|
|
666 |
#else |
667 |
bio_ctx_cache = kmem_cache_create ("truecrypt-bioctx", sizeof (struct bio_ctx), 0, 0, NULL); |
668 |
#endif |
669 |
|
660 |
if (!bio_ctx_cache) |
670 |
if (!bio_ctx_cache) |
661 |
{ |
671 |
{ |
662 |
error ("kmem_cache_create failed"); |
672 |
error ("kmem_cache_create failed"); |