From 7110fcbc0041b59e271bbd6c0e660e8f80e891c2 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Wed, 16 Apr 2014 06:35:19 +0000 Subject: [PATCH] scst_vdisk: Build fix for kernels < 2.6.36 (see also r5416) git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5422 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/dev_handlers/scst_vdisk.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index 656780927..c9a1f47e9 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -4651,7 +4651,12 @@ static void blockio_exec_rw(struct vdisk_cmd_params *p, bool write, bool fua) bio->bi_rw |= REQ_FUA; if (cmd->queue_type == SCST_CMD_QUEUE_HEAD_OF_QUEUE) { +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36) || \ + defined(RHEL_MAJOR) && RHEL_MAJOR -0 >= 6 bio->bi_rw |= REQ_SYNC; +#else + bio->bi_rw |= 1 << BIO_RW_SYNCIO; +#endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36) || \ defined(RHEL_MAJOR) && RHEL_MAJOR -0 >= 6 bio->bi_rw |= REQ_META;