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
This commit is contained in:
Bart Van Assche
2012-05-08 21:09:40 +00:00
parent 79b72d5606
commit 0aca2096d9

View File

@@ -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