Skip to content

Commit

Permalink
Merge pull request #58 from asperg/master
Browse files Browse the repository at this point in the history
kernel 5.12.x support
  • Loading branch information
pkoutoupis authored May 22, 2021
2 parents 2d61878 + 606ae13 commit 513af74
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions module/rapiddisk.c
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ rdsk_submit_bio(struct bio *bio)
rdsk_make_request(struct request_queue *q, struct bio *bio)
#endif
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0)
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(5,12,0))
struct rdsk_device *rdsk = bio->bi_disk->private_data;
#else
struct block_device *bdev = bio->bi_bdev;
Expand All @@ -511,7 +511,7 @@ rdsk_make_request(struct request_queue *q, struct bio *bio)
#else
sector = bio->bi_sector;
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0)
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(5,12,0))
if ((sector + bio_sectors(bio)) > get_capacity(bio->bi_disk))
#else
if ((sector + bio_sectors(bio)) > get_capacity(bdev->bd_disk))
Expand Down

0 comments on commit 513af74

Please sign in to comment.