diff --git a/scst/src/scst_mem.c b/scst/src/scst_mem.c index 92a8f5c0f..a0bba7662 100644 --- a/scst/src/scst_mem.c +++ b/scst/src/scst_mem.c @@ -1376,11 +1376,15 @@ static void sgv_pool_init_cache(struct sgv_pool *pool, int cache_num, scnprintf(pool->cache_names[cache_num], sizeof(pool->cache_names[cache_num]), "%s-%uK", pool->name, (pages << PAGE_SHIFT) >> 10); - pool->caches[cache_num] = kmem_cache_create_usercopy( + pool->caches[cache_num] = kmem_cache_create( pool->cache_names[cache_num], size, - /*align=*/0, per_cpu ? SCST_SLAB_FLAGS : - (SCST_SLAB_FLAGS|SLAB_HWCACHE_ALIGN), - /*useroffset=*/0, /*usersize=*/size, /*ctor=*/NULL); + 0, per_cpu ? SCST_SLAB_FLAGS : + (SCST_SLAB_FLAGS|SLAB_HWCACHE_ALIGN), NULL +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 23)) + , NULL); +#else + ); +#endif return; }