summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fs/bio.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/bio.c b/fs/bio.c
index cef6258b8943..9cc1430b4495 100644
--- a/fs/bio.c
+++ b/fs/bio.c
@@ -1589,6 +1589,13 @@ static void __init biovec_init_slabs(void)
int size;
struct biovec_slab *bvs = bvec_slabs + i;
+#ifndef CONFIG_BLK_DEV_INTEGRITY
+ if (bvs->nr_vecs <= BIO_INLINE_VECS) {
+ bvs->slab = NULL;
+ continue;
+ }
+#endif
+
size = bvs->nr_vecs * sizeof(struct bio_vec);
bvs->slab = kmem_cache_create(bvs->name, size, 0,
SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL);