From 16fe64bc13448869ee0ea837308f96eae2691688 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Mon, 9 Oct 2017 18:10:48 +0000 Subject: [PATCH] scst_vdisk: Fix a bug in the Linux kernel v4.13 port See also trunk r7240. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7248 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/include/backport.h | 1 + scst/src/dev_handlers/scst_vdisk.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/scst/include/backport.h b/scst/include/backport.h index 3aeb67771..f2c0352a7 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -57,6 +57,7 @@ static inline struct bio_set *bioset_create_backport(unsigned int pool_size, return bioset_create(pool_size, front_pad); } #define bioset_create bioset_create_backport +#define BIOSET_NEED_BVECS 1 #endif /* */ diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index 3e5efddfc..c4bfb1969 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -7818,7 +7818,7 @@ static int vdisk_create_bioset(struct scst_vdisk_dev *virt_dev) EXTRACHECKS_BUG_ON(virt_dev->vdisk_bioset || !virt_dev->blockio); /* Pool size doesn't really matter */ - virt_dev->vdisk_bioset = bioset_create(2, 0, 0); + virt_dev->vdisk_bioset = bioset_create(2, 0, BIOSET_NEED_BVECS); if (virt_dev->vdisk_bioset == NULL) { PRINT_ERROR("Failed to create bioset (dev %s)", virt_dev->name); res = -ENOMEM;