aboutsummaryrefslogtreecommitdiffstats
path: root/module/os/linux/zfs/vdev_disk.c
diff options
context:
space:
mode:
authorColeman Kane <[email protected]>2021-02-22 21:07:51 -0500
committerBrian Behlendorf <[email protected]>2021-02-24 10:04:34 -0800
commitd939930fccbf7382c3525bba59cc04e9afc28fdc (patch)
treeadfcf7f29e7a2b504cdf1fef6708ce6abe740b85 /module/os/linux/zfs/vdev_disk.c
parent8e43fa12c571878f32119122771888ab9092a75a (diff)
Linux 5.12 compat: bio->bi_disk member moved
The struct bio member bi_disk was moved underneath a new member named bi_bdev. So all attempts to reference bio->bi_disk need to now become bio->bi_bdev->bd_disk. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Coleman Kane <[email protected]> Closes #11639
Diffstat (limited to 'module/os/linux/zfs/vdev_disk.c')
-rw-r--r--module/os/linux/zfs/vdev_disk.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/module/os/linux/zfs/vdev_disk.c b/module/os/linux/zfs/vdev_disk.c
index b373f2c2e..ff71ef4cd 100644
--- a/module/os/linux/zfs/vdev_disk.c
+++ b/module/os/linux/zfs/vdev_disk.c
@@ -494,7 +494,11 @@ vdev_blkg_tryget(struct blkcg_gq *blkg)
static inline void
vdev_bio_associate_blkg(struct bio *bio)
{
+#if defined(HAVE_BIO_BDEV_DISK)
+ struct request_queue *q = bio->bi_bdev->bd_disk->queue;
+#else
struct request_queue *q = bio->bi_disk->queue;
+#endif
ASSERT3P(q, !=, NULL);
ASSERT3P(bio->bi_blkg, ==, NULL);