Whamcloud - gitweb
LU-6142 lustre: use BIT() macro where appropriate in include
[fs/lustre-release.git] / lustre / obdclass / lustre_handles.c
index 27f6971..061090a 100644 (file)
@@ -166,7 +166,7 @@ int class_handle_init(void)
 
        LASSERT(handle_hash == NULL);
 
-       OBD_ALLOC_LARGE(handle_hash, sizeof(*bucket) * HANDLE_HASH_SIZE);
+       OBD_ALLOC_PTR_ARRAY_LARGE(handle_hash, HANDLE_HASH_SIZE);
        if (handle_hash == NULL)
                return -ENOMEM;
 
@@ -212,7 +212,7 @@ void class_handle_cleanup(void)
 
        count = cleanup_all_handles();
 
-       OBD_FREE_LARGE(handle_hash, sizeof(*handle_hash) * HANDLE_HASH_SIZE);
+       OBD_FREE_PTR_ARRAY_LARGE(handle_hash, HANDLE_HASH_SIZE);
        handle_hash = NULL;
 
        if (count != 0)