return 0;
}
- lock->l_callback_timeout = cfs_time_shift(obd_timeout / 2);
+ lock->l_callback_timeout =cfs_time_add(cfs_time_current(),
+ cfs_time_seconds(obd_timeout)/2);
timeout_rounded = round_timeout(lock->l_callback_timeout);
void __exit ldlm_exit(void)
{
- if ( ldlm_refcount )
+ int rc;
+
+ if (ldlm_refcount)
CERROR("ldlm_refcount is %d in ldlm_exit!\n", ldlm_refcount);
- LASSERTF(cfs_mem_cache_destroy(ldlm_resource_slab) == 0,
- "couldn't free ldlm resource slab\n");
- LASSERTF(cfs_mem_cache_destroy(ldlm_lock_slab) == 0,
- "couldn't free ldlm lock slab\n");
+ rc = cfs_mem_cache_destroy(ldlm_resource_slab);
+ LASSERTF(rc == 0, "couldn't free ldlm resource slab\n");
+ rc = cfs_mem_cache_destroy(ldlm_lock_slab);
+ LASSERTF(rc == 0, "couldn't free ldlm lock slab\n");
}
/* ldlm_extent.c */
static void __exit exit_lustre_lite(void)
{
+ int rc;
+
unregister_filesystem(&lustre_lite_fs_type);
unregister_filesystem(&lustre_fs_type);
ll_unregister_cache(&ll_cache_definition);
- LASSERTF(kmem_cache_destroy(ll_file_data_slab) == 0,
- "couldn't destroy ll_file_data slab\n");
- if (ll_async_page_slab)
- LASSERTF(kmem_cache_destroy(ll_async_page_slab) == 0,
- "couldn't destroy ll_async_page slab\n");
+ rc = kmem_cache_destroy(ll_file_data_slab);
+ LASSERTF(rc == 0, "couldn't destroy ll_file_data slab\n");
+ if (ll_async_page_slab) {
+ rc = kmem_cache_destroy(ll_async_page_slab);
+ LASSERTF(rc == 0, "couldn't destroy ll_async_page slab\n");
+ }
if (proc_lustre_fs_root) {
lprocfs_remove(proc_lustre_fs_root);
void ll_destroy_inodecache(void)
{
- LASSERTF(kmem_cache_destroy(ll_inode_cachep) == 0,
- "ll_inode_cache: not all structures were freed\n");
+ int rc;
+
+ rc = kmem_cache_destroy(ll_inode_cachep);
+ LASSERTF(rc == 0, "ll_inode_cache: not all structures were freed\n");
}
/* exported operations */
static void __exit exit_lustre_lite(void)
{
+ int rc;
+
unregister_filesystem(&lustre_fs_type);
unregister_filesystem(&lustre_lite_fs_type);
ll_unregister_cache(&ll_cache_definition);
ll_destroy_inodecache();
- LASSERTF(kmem_cache_destroy(ll_file_data_slab) == 0,
- "couldn't destroy ll_file_data slab\n");
- if (ll_async_page_slab)
- LASSERTF(kmem_cache_destroy(ll_async_page_slab) == 0,
- "couldn't destroy ll_async_page slab\n");
+ rc = kmem_cache_destroy(ll_file_data_slab):
+ LASSERTF(rc == 0, "couldn't destroy ll_file_data slab\n");
+ if (ll_async_page_slab) {
+ rc = kmem_cache_destroy(ll_async_page_slab);
+ LASSERTF(rc == 0, "couldn't destroy ll_async_page slab\n");
+ }
if (proc_lustre_fs_root) {
lprocfs_remove(proc_lustre_fs_root);
static void __exit fsfilt_ext3_exit(void)
{
+ int rc;
+
fsfilt_unregister_ops(&fsfilt_ext3_ops);
- LASSERT(kmem_cache_destroy(fcb_cache) == 0);
+ rc = kmem_cache_destroy(fcb_cache);
+ LASSERTF(rc == 0, "couldn't destroy fcb_cache slab\n");
}
module_init(fsfilt_ext3_init);
void obd_cleanup_caches(void)
{
+ int rc;
+
ENTRY;
if (obdo_cachep) {
- LASSERTF(cfs_mem_cache_destroy(obdo_cachep) == 0,
- "Cannot destory ll_obdo_cache\n");
+ rc = cfs_mem_cache_destroy(obdo_cachep);
+ LASSERTF(rc == 0, "Cannot destory ll_obdo_cache\n");
obdo_cachep = NULL;
}
if (import_cachep) {
- LASSERTF(cfs_mem_cache_destroy(import_cachep) == 0,
- "Cannot destory ll_import_cache\n");
+ rc = cfs_mem_cache_destroy(import_cachep);
+ LASSERTF(rc == 0, "Cannot destory ll_import_cache\n");
import_cachep = NULL;
}
EXIT;
if (qunit_cachep) {
int rc;
rc = kmem_cache_destroy(qunit_cachep);
- LASSERT(rc == 0);
+ LASSERTF(rc == 0, "couldn't destory qunit_cache slab\n");
qunit_cachep = NULL;
}
EXIT;
spin_unlock(&qinfo_list_lock);
rc = cfs_mem_cache_destroy(qinfo_cachep);
- LASSERT(rc == 0);
+ LASSERTF(rc == 0, "couldn't destory qinfo_cachep slab\n");
RETURN(0);
}
if (lustre_dquot_cachep) {
int rc;
rc = kmem_cache_destroy(lustre_dquot_cachep);
- LASSERT(rc == 0);
+ LASSERTF(rc == 0,"couldn't destroy lustre_dquot_cachep slab\n");
lustre_dquot_cachep = NULL;
}
EXIT;