diff --git a/include/os/linux/kernel/linux/blkdev_compat.h b/include/os/linux/kernel/linux/blkdev_compat.h index 45de1f499..f04eb5b25 100644 --- a/include/os/linux/kernel/linux/blkdev_compat.h +++ b/include/os/linux/kernel/linux/blkdev_compat.h @@ -394,7 +394,11 @@ vdev_lookup_bdev(const char *path, dev_t *dev) static inline void bio_set_op_attrs(struct bio *bio, unsigned rw, unsigned flags) { +#if defined(HAVE_BIO_BI_OPF) + bio->bi_opf = rw | flags; +#else bio->bi_rw |= rw | flags; +#endif /* HAVE_BIO_BI_OPF */ } #endif