RETURN(-EINVAL);
/* copy UUID */
- if (cfs_copy_to_user(data->ioc_pbuf2, obd2cli_tgt(osc_obd),
- min((int) data->ioc_plen2,
- (int) sizeof(struct obd_uuid))))
+ if (copy_to_user(data->ioc_pbuf2, obd2cli_tgt(osc_obd),
+ min((int)data->ioc_plen2,
+ (int)sizeof(struct obd_uuid))))
RETURN(-EFAULT);
flags = uarg ? *(__u32*)uarg : 0;
flags);
if (rc)
RETURN(rc);
- if (cfs_copy_to_user(data->ioc_pbuf1, &stat_buf,
+ if (copy_to_user(data->ioc_pbuf1, &stat_buf,
min((int) data->ioc_plen1,
(int) sizeof(stat_buf))))
RETURN(-EFAULT);
*genp = lov->lov_tgts[i]->ltd_gen;
}
- if (cfs_copy_to_user((void *)uarg, buf, len))
+ if (copy_to_user((void *)uarg, buf, len))
rc = -EFAULT;
obd_ioctl_freedata(buf, len);
break;
.o_quotacheck = lov_quotacheck,
};
-cfs_mem_cache_t *lov_oinfo_slab;
+struct kmem_cache *lov_oinfo_slab;
extern struct lu_kmem_descr lov_caches[];
int __init lov_init(void)
{
struct lprocfs_static_vars lvars = { 0 };
- int rc, rc2;
+ int rc;
ENTRY;
/* print an address of _any_ initialized kernel symbol from this
if (rc)
return rc;
- lov_oinfo_slab = cfs_mem_cache_create("lov_oinfo",
- sizeof(struct lov_oinfo),
- 0, CFS_SLAB_HWCACHE_ALIGN);
+ lov_oinfo_slab = kmem_cache_create("lov_oinfo",
+ sizeof(struct lov_oinfo), 0,
+ SLAB_HWCACHE_ALIGN, NULL);
if (lov_oinfo_slab == NULL) {
lu_kmem_fini(lov_caches);
return -ENOMEM;
LUSTRE_LOV_NAME, &lov_device_type);
if (rc) {
- rc2 = cfs_mem_cache_destroy(lov_oinfo_slab);
- LASSERT(rc2 == 0);
+ kmem_cache_destroy(lov_oinfo_slab);
lu_kmem_fini(lov_caches);
}
#ifdef __KERNEL__
static void /*__exit*/ lov_exit(void)
{
- int rc;
-
- class_unregister_type(LUSTRE_LOV_NAME);
- rc = cfs_mem_cache_destroy(lov_oinfo_slab);
- LASSERT(rc == 0);
-
+ class_unregister_type(LUSTRE_LOV_NAME);
+ kmem_cache_destroy(lov_oinfo_slab);
lu_kmem_fini(lov_caches);
}