kmem_cache_free(obdo_cachep, oa);
}
-extern kmem_cache_t *handle_cachep;
-static inline struct lustre_handle *handle_alloc(void)
-{
- struct lustre_handle *handle;
-
- handle = kmem_cache_alloc(handle_cachep, SLAB_KERNEL);
- memset(handle, 0, sizeof (*handle));
-
- return handle;
-}
-
-static inline void handle_free(struct lustre_handle *handle)
-{
- if (!handle)
- return;
- kmem_cache_free(handle_cachep, handle);
-}
-
-
static inline void obdo_from_iattr(struct obdo *oa, struct iattr *attr)
{
unsigned int ia_valid = attr->ia_valid;
EXPORT_SYMBOL(obd_dev);
EXPORT_SYMBOL(obdo_cachep);
-EXPORT_SYMBOL(handle_cachep);
EXPORT_SYMBOL(obd_memory);
EXPORT_SYMBOL(obd_fail_loc);
EXPORT_SYMBOL(obd_timeout);
kmem_cache_t *obdo_cachep = NULL;
kmem_cache_t *import_cachep = NULL;
kmem_cache_t *export_cachep = NULL;
-kmem_cache_t *handle_cachep = NULL;
int (*ptlrpc_put_connection_superhack)(struct ptlrpc_connection *c);
CERROR("Cannot destory ll_export_cache\n");
export_cachep = NULL;
}
- if (handle_cachep) {
- rc = kmem_cache_destroy(handle_cachep);
- if (rc)
- CERROR("Cannot destory ll_handle_cache\n");
- handle_cachep = NULL;
- }
EXIT;
}
if (!import_cachep)
GOTO(out, -ENOMEM);
- LASSERT(handle_cachep == NULL);
- handle_cachep = kmem_cache_create("ll_handle_cache",
- sizeof(struct lustre_handle),
- 0, 0, NULL, NULL);
- if (!handle_cachep)
- RETURN(-ENOMEM);
-
RETURN(0);
out:
obd_cleanup_caches();