From e94161d63d204f56491f2148fce8e1d0bdcc7153 Mon Sep 17 00:00:00 2001 From: adilger Date: Tue, 29 Oct 2002 08:32:12 +0000 Subject: [PATCH] Remove some cruft I added for lock allocation, I've resolved it differently. --- lustre/include/linux/obd_class.h | 19 ------------------- lustre/obdclass/class_obd.c | 1 - lustre/obdclass/genops.c | 14 -------------- 3 files changed, 34 deletions(-) diff --git a/lustre/include/linux/obd_class.h b/lustre/include/linux/obd_class.h index 211527d..2b66b1b 100644 --- a/lustre/include/linux/obd_class.h +++ b/lustre/include/linux/obd_class.h @@ -488,25 +488,6 @@ static inline void obdo_free(struct obdo *oa) 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; diff --git a/lustre/obdclass/class_obd.c b/lustre/obdclass/class_obd.c index af17bf7..97d503f 100644 --- a/lustre/obdclass/class_obd.c +++ b/lustre/obdclass/class_obd.c @@ -1061,7 +1061,6 @@ void (*class_signal_connection_failure)(struct ptlrpc_connection *); 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); diff --git a/lustre/obdclass/genops.c b/lustre/obdclass/genops.c index 6750092..aaa0316 100644 --- a/lustre/obdclass/genops.c +++ b/lustre/obdclass/genops.c @@ -23,7 +23,6 @@ extern struct list_head obd_types; 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); @@ -268,12 +267,6 @@ void obd_cleanup_caches(void) 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; } @@ -300,13 +293,6 @@ int obd_init_caches(void) 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(); -- 1.8.3.1