From 9ad346b84e4b0f4622a6956d1eef64fc03e25c28 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Wed, 14 Apr 2021 20:31:39 +0000 Subject: [PATCH] scst_vdisk: Complete port to Linux kernel v5.12 This is a variant of a patch provided by Mark Ruijter. Fixes: https://github.com/bvanassche/scst/issues/34 git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9380 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/dev_handlers/scst_vdisk.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index 463fdb5c1..aa01fea1b 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -488,8 +488,10 @@ static int vdisk_blockio_flush(struct block_device *bdev, gfp_t gfp_mask, res = blkdev_issue_flush(bdev, gfp_mask, NULL, BLKDEV_IFL_WAIT); #elif LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0) res = blkdev_issue_flush(bdev, gfp_mask, NULL); -#else +#elif LINUX_VERSION_CODE < KERNEL_VERSION(5, 12, 0) res = blkdev_issue_flush(bdev, gfp_mask); +#else + res = blkdev_issue_flush(bdev); #endif }