diff options
author | наб <[email protected]> | 2022-03-24 15:22:53 +0100 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2022-03-28 09:51:59 -0700 |
commit | d1325b4fa2ddc42beb88d00bf85041507341fdd0 (patch) | |
tree | f01e562e153ec40dc9626f5d328341d9868ce0ad /module/os | |
parent | 427fad7f247d8ef0975e6038587d954bd771fa63 (diff) |
Linux 5.18 compat: 4-argument bio_alloc()
bio_alloc(gfp_t gfp_mask, unsigned short nr_iovecs)
became
bio_alloc(struct block_device *bdev, unsigned short nr_vecs,
unsigned int opf, gfp_t gfp_mask)
passing NULL/0 continues previous behaviour
Upstream-commit: 07888c665b405b1cd3577ddebfeb74f4717a84c4 ("block:
pass a block_device and opf to bio_alloc")
Reviewed-by: Tony Hutter <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes #13251
Diffstat (limited to 'module/os')
-rw-r--r-- | module/os/linux/zfs/vdev_disk.c | 4 |
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 61518bad0..6cec5be44 100644 --- a/module/os/linux/zfs/vdev_disk.c +++ b/module/os/linux/zfs/vdev_disk.c @@ -563,6 +563,10 @@ vdev_submit_bio(struct bio *bio) current->bio_list = bio_list; } +#ifdef HAVE_BIO_ALLOC_4ARG +#define bio_alloc(gfp_mask, nr_iovecs) bio_alloc(NULL, nr_iovecs, 0, gfp_mask) +#endif + static int __vdev_disk_physio(struct block_device *bdev, zio_t *zio, size_t io_size, uint64_t io_offset, int rw, int flags) |