From 0aca2096d9e4b8f7a95b4c1958be2422cdc733d8 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 8 May 2012 21:09:40 +0000 Subject: [PATCH] scst_vdisk, kernel 2.6.32: Avoid that adding a vdisk_blockio device triggers a BUG() git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4292 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/dev_handlers/scst_vdisk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index da107dd26..db2f0d640 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -693,7 +693,7 @@ static void vdisk_check_tp_support(struct scst_vdisk_dev *virt_dev) virt_dev->filename); goto out_close; } -#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 31) +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 32) || (defined(RHEL_MAJOR) && RHEL_MAJOR -0 >= 6) virt_dev->dev_thin_provisioned = blk_queue_discard(bdev_get_queue(inode->i_bdev)); #endif