static void exit_libcfs_module(void) { int rc; remove_proc(); CDEBUG(D_MALLOC, "before Portals cleanup: kmem %d\n", atomic_read(&libcfs_kmemory)); if (cfs_sched_rehash != NULL) { cfs_wi_sched_destroy(cfs_sched_rehash); cfs_sched_rehash = NULL; } cfs_crypto_unregister(); cfs_wi_shutdown(); rc = misc_deregister(&libcfs_dev); if (rc) CERROR("misc_deregister error %d\n", rc); #if LWT_SUPPORT lwt_fini(); #endif cfs_cpu_fini(); if (atomic_read(&libcfs_kmemory) != 0) CERROR("Portals memory leaked: %d bytes\n", atomic_read(&libcfs_kmemory)); rc = libcfs_debug_cleanup(); if (rc) printk(KERN_ERR "LustreError: libcfs_debug_cleanup: %d\n", rc); fini_rwsem(&ioctl_list_sem); fini_rwsem(&cfs_tracefile_sem); libcfs_arch_cleanup(); }
void tracefile_fini_arch() { fini_rwsem(&tracefile_sem); }