From 9bef92a7e96a7e2ceb7aadf016a439933c0825a0 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 16 Jun 2015 05:35:06 +0000 Subject: [PATCH] scst, T10-PI: Kernel 2.6.30 build fix git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6318 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/dev_handlers/scst_vdisk.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index 2ac5a37c4..437e37d5e 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -7337,8 +7337,12 @@ static int vdisk_create_bioset(struct scst_vdisk_dev *virt_dev) } if (virt_dev->dif_mode & SCST_DIF_MODE_DEV) { +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31) /* The same, pool size doesn't really matter */ res = bioset_integrity_create(virt_dev->vdisk_bioset, 2); +#else + res = -ENOSYS; +#endif if (res != 0) { PRINT_ERROR("Failed to create integrity bioset " "(dev %s)", virt_dev->name);