static int __init init_gfs2_fs(void) { int error; error = gfs2_sys_init(); if (error) return error; error = gfs2_glock_init(); if (error) goto fail; error = -ENOMEM; gfs2_glock_cachep = kmem_cache_create("gfs2_glock", sizeof(struct gfs2_glock), 0, 0, gfs2_init_glock_once); if (!gfs2_glock_cachep) goto fail; gfs2_inode_cachep = kmem_cache_create("gfs2_inode", sizeof(struct gfs2_inode), 0, SLAB_RECLAIM_ACCOUNT| SLAB_MEM_SPREAD, gfs2_init_inode_once); if (!gfs2_inode_cachep) goto fail; gfs2_bufdata_cachep = kmem_cache_create("gfs2_bufdata", sizeof(struct gfs2_bufdata), 0, 0, NULL); if (!gfs2_bufdata_cachep) goto fail; error = register_filesystem(&gfs2_fs_type); if (error) goto fail; error = register_filesystem(&gfs2meta_fs_type); if (error) goto fail_unregister; gfs2_register_debugfs(); printk("GFS2 (built %s %s) installed\n", __DATE__, __TIME__); return 0; fail_unregister: unregister_filesystem(&gfs2_fs_type); fail: if (gfs2_bufdata_cachep) kmem_cache_destroy(gfs2_bufdata_cachep); if (gfs2_inode_cachep) kmem_cache_destroy(gfs2_inode_cachep); if (gfs2_glock_cachep) kmem_cache_destroy(gfs2_glock_cachep); gfs2_sys_uninit(); return error; }
void __exit sjfs_exit(void) { // unregister the filesystem unregister_filesystem(&sjfs_fs_type); }
static void __exit plgfs_exit(void) { unregister_blkdev(plgfs_major, "pluginfs"); unregister_filesystem(&plgfs_type); }
static void __exit exit_ncp_fs(void) { DPRINTK("ncpfs: exit_ncp_fs called\n"); unregister_filesystem(&ncp_fs_type); destroy_inodecache(); }
static int __init init_gfs2_fs(void) { int error; gfs2_str2qstr(&gfs2_qdot, "."); gfs2_str2qstr(&gfs2_qdotdot, ".."); error = gfs2_sys_init(); if (error) return error; error = gfs2_glock_init(); if (error) goto fail; error = -ENOMEM; gfs2_glock_cachep = kmem_cache_create("gfs2_glock", sizeof(struct gfs2_glock), 0, 0, gfs2_init_glock_once); if (!gfs2_glock_cachep) goto fail; gfs2_glock_aspace_cachep = kmem_cache_create("gfs2_glock(aspace)", sizeof(struct gfs2_glock) + sizeof(struct address_space), 0, 0, gfs2_init_gl_aspace_once); if (!gfs2_glock_aspace_cachep) goto fail; gfs2_inode_cachep = kmem_cache_create("gfs2_inode", sizeof(struct gfs2_inode), 0, SLAB_RECLAIM_ACCOUNT| SLAB_MEM_SPREAD, gfs2_init_inode_once); if (!gfs2_inode_cachep) goto fail; gfs2_bufdata_cachep = kmem_cache_create("gfs2_bufdata", sizeof(struct gfs2_bufdata), 0, 0, NULL); if (!gfs2_bufdata_cachep) goto fail; gfs2_rgrpd_cachep = kmem_cache_create("gfs2_rgrpd", sizeof(struct gfs2_rgrpd), 0, 0, NULL); if (!gfs2_rgrpd_cachep) goto fail; gfs2_quotad_cachep = kmem_cache_create("gfs2_quotad", sizeof(struct gfs2_quota_data), 0, 0, NULL); if (!gfs2_quotad_cachep) goto fail; gfs2_rsrv_cachep = kmem_cache_create("gfs2_mblk", sizeof(struct gfs2_blkreserv), 0, 0, NULL); if (!gfs2_rsrv_cachep) goto fail; register_shrinker(&qd_shrinker); error = register_filesystem(&gfs2_fs_type); if (error) goto fail; error = register_filesystem(&gfs2meta_fs_type); if (error) goto fail_unregister; error = -ENOMEM; gfs_recovery_wq = alloc_workqueue("gfs_recovery", WQ_MEM_RECLAIM | WQ_FREEZABLE, 0); if (!gfs_recovery_wq) goto fail_wq; gfs2_control_wq = alloc_workqueue("gfs2_control", WQ_NON_REENTRANT | WQ_UNBOUND | WQ_FREEZABLE, 0); if (!gfs2_control_wq) goto fail_recovery; gfs2_page_pool = mempool_create_page_pool(64, 0); if (!gfs2_page_pool) goto fail_control; gfs2_register_debugfs(); printk("GFS2 installed\n"); return 0; fail_control: destroy_workqueue(gfs2_control_wq); fail_recovery: destroy_workqueue(gfs_recovery_wq); fail_wq: unregister_filesystem(&gfs2meta_fs_type); fail_unregister: unregister_filesystem(&gfs2_fs_type); fail: unregister_shrinker(&qd_shrinker); gfs2_glock_exit(); if (gfs2_rsrv_cachep) kmem_cache_destroy(gfs2_rsrv_cachep); if (gfs2_quotad_cachep) kmem_cache_destroy(gfs2_quotad_cachep); if (gfs2_rgrpd_cachep) kmem_cache_destroy(gfs2_rgrpd_cachep); if (gfs2_bufdata_cachep) kmem_cache_destroy(gfs2_bufdata_cachep); if (gfs2_inode_cachep) kmem_cache_destroy(gfs2_inode_cachep); if (gfs2_glock_aspace_cachep) kmem_cache_destroy(gfs2_glock_aspace_cachep); if (gfs2_glock_cachep) kmem_cache_destroy(gfs2_glock_cachep); gfs2_sys_uninit(); return error; }
void cleanup_module(void) { unregister_filesystem(&umsdos_fs_type); }
static void gatorfs_unregister(void) { unregister_filesystem(&gatorfs_type); }
static void __exit exit_hfs_fs(void) { hfs_cat_free(); unregister_filesystem(&hfs_fs); }
static void __exit exit_jffs2_fs(void) { jffs2_destroy_slab_caches(); jffs2_zlib_exit(); unregister_filesystem(&jffs2_fs_type); }
static void __exit exit_ntfs_fs(void) { SYSCTL(0); ntfs_debug(DEBUG_OTHER, "unregistering %s\n", ntfs_fs_type.name); unregister_filesystem(&ntfs_fs_type); }
static int __init init_gfs2_fs(void) { int error; gfs2_str2qstr(&gfs2_qdot, "."); gfs2_str2qstr(&gfs2_qdotdot, ".."); error = gfs2_sys_init(); if (error) return error; error = gfs2_glock_init(); if (error) goto fail; error = -ENOMEM; gfs2_glock_cachep = kmem_cache_create("gfs2_glock", sizeof(struct gfs2_glock), 0, 0, gfs2_init_glock_once); if (!gfs2_glock_cachep) goto fail; gfs2_glock_aspace_cachep = kmem_cache_create("gfs2_glock(aspace)", sizeof(struct gfs2_glock) + sizeof(struct address_space), 0, 0, gfs2_init_gl_aspace_once); if (!gfs2_glock_aspace_cachep) goto fail; gfs2_inode_cachep = kmem_cache_create("gfs2_inode", sizeof(struct gfs2_inode), 0, SLAB_RECLAIM_ACCOUNT| SLAB_MEM_SPREAD, gfs2_init_inode_once); if (!gfs2_inode_cachep) goto fail; gfs2_bufdata_cachep = kmem_cache_create("gfs2_bufdata", sizeof(struct gfs2_bufdata), 0, 0, NULL); if (!gfs2_bufdata_cachep) goto fail; gfs2_rgrpd_cachep = kmem_cache_create("gfs2_rgrpd", sizeof(struct gfs2_rgrpd), 0, 0, NULL); if (!gfs2_rgrpd_cachep) goto fail; gfs2_quotad_cachep = kmem_cache_create("gfs2_quotad", sizeof(struct gfs2_quota_data), 0, 0, NULL); if (!gfs2_quotad_cachep) goto fail; register_shrinker(&qd_shrinker); error = register_filesystem(&gfs2_fs_type); if (error) goto fail; error = register_filesystem(&gfs2meta_fs_type); if (error) goto fail_unregister; error = -ENOMEM; gfs_recovery_wq = alloc_workqueue("gfs_recovery", WQ_MEM_RECLAIM | WQ_FREEZABLE, 0); if (!gfs_recovery_wq) goto fail_wq; gfs2_register_debugfs(); printk("GFS2 (built %s %s) installed\n", __DATE__, __TIME__); return 0; fail_wq: unregister_filesystem(&gfs2meta_fs_type); fail_unregister: unregister_filesystem(&gfs2_fs_type); fail: unregister_shrinker(&qd_shrinker); gfs2_glock_exit(); if (gfs2_quotad_cachep) kmem_cache_destroy(gfs2_quotad_cachep); if (gfs2_rgrpd_cachep) kmem_cache_destroy(gfs2_rgrpd_cachep); if (gfs2_bufdata_cachep) kmem_cache_destroy(gfs2_bufdata_cachep); if (gfs2_inode_cachep) kmem_cache_destroy(gfs2_inode_cachep); if (gfs2_glock_aspace_cachep) kmem_cache_destroy(gfs2_glock_aspace_cachep); if (gfs2_glock_cachep) kmem_cache_destroy(gfs2_glock_cachep); gfs2_sys_uninit(); return error; }
void __exit oprofilefs_unregister(void) { unregister_filesystem(&oprofilefs_type); }
static void __exit securityfs_exit(void) { simple_release_fs(&mount, &mount_count); unregister_filesystem(&fs_type); subsystem_unregister(&security_subsys); }
static void __exit vperfctrfs_exit(void) { unregister_filesystem(&vperfctrfs_type); mntput(vperfctr_mnt); }
static void __exit ovl_exit(void) { unregister_filesystem(&ovl_fs_type); }
void reiserfs_unload(void) { unregister_filesystem(&reiserfs_type); }
static void __exit exit_ext2_fs(void) { unregister_filesystem(&ext2_fs_type); destroy_inodecache(); exit_ext2_xattr(); }
static void __exit vxfs_cleanup(void) { unregister_filesystem(&vxfs_fs_type); kmem_cache_destroy(vxfs_inode_cachep); }
static void __exit exit_cramfs_fs(void) { cramfs_uncompress_exit(); unregister_filesystem(&cramfs_fs_type); }
static void __exit exit_autofs4_fs(void) { autofs_dev_ioctl_exit(); unregister_filesystem(&autofs_fs_type); }
static void __exit exit_bfs_fs(void) { unregister_filesystem(&bfs_fs_type); }
static void __exit debugfs_exit(void) { simple_release_fs(&debugfs_mount, &debugfs_mount_count); unregister_filesystem(&debug_fs_type); kobject_put(debug_kobj); }
static void __exit capifs_exit(void) { unregister_filesystem(&capifs_fs_type); mntput(capifs_mnt); }
static void __exit exit_hfs_fs(void) { unregister_filesystem(&hfs_fs_type); kmem_cache_destroy(hfs_inode_cachep); }
static void __exit exit_sysv_fs(void) { unregister_filesystem(&sysv_fs_type); unregister_filesystem(&v7_fs_type); sysv_destroy_icache(); }
// // this is exactly what 2.3.99-pre9's init_ext2_fs is // static void __exit exit_reiserfs_fs(void) { reiserfs_proc_unregister_global( "version" ); reiserfs_proc_info_global_done(); unregister_filesystem(&reiserfs_fs_type); }
static int __init init_cifs(void) { int rc = 0; cifs_proc_init(); INIT_LIST_HEAD(&cifs_tcp_ses_list); #ifdef CONFIG_CIFS_EXPERIMENTAL INIT_LIST_HEAD(&GlobalDnotifyReqList); INIT_LIST_HEAD(&GlobalDnotifyRsp_Q); #endif /* * Initialize Global counters */ atomic_set(&sesInfoAllocCount, 0); atomic_set(&tconInfoAllocCount, 0); atomic_set(&tcpSesAllocCount, 0); atomic_set(&tcpSesReconnectCount, 0); atomic_set(&tconInfoReconnectCount, 0); atomic_set(&bufAllocCount, 0); atomic_set(&smBufAllocCount, 0); #ifdef CONFIG_CIFS_STATS2 atomic_set(&totBufAllocCount, 0); atomic_set(&totSmBufAllocCount, 0); #endif /* CONFIG_CIFS_STATS2 */ atomic_set(&midCount, 0); GlobalCurrentXid = 0; GlobalTotalActiveXid = 0; GlobalMaxActiveXid = 0; memset(Local_System_Name, 0, 15); rwlock_init(&GlobalSMBSeslock); rwlock_init(&cifs_tcp_ses_lock); spin_lock_init(&GlobalMid_Lock); if (cifs_max_pending < 2) { cifs_max_pending = 2; cFYI(1, "cifs_max_pending set to min of 2"); } else if (cifs_max_pending > 256) { cifs_max_pending = 256; cFYI(1, "cifs_max_pending set to max of 256"); } rc = cifs_init_inodecache(); if (rc) goto out_clean_proc; rc = cifs_init_mids(); if (rc) goto out_destroy_inodecache; rc = cifs_init_request_bufs(); if (rc) goto out_destroy_mids; rc = register_filesystem(&cifs_fs_type); if (rc) goto out_destroy_request_bufs; #ifdef CONFIG_CIFS_UPCALL rc = register_key_type(&cifs_spnego_key_type); if (rc) goto out_unregister_filesystem; #endif #ifdef CONFIG_CIFS_DFS_UPCALL rc = register_key_type(&key_type_dns_resolver); if (rc) goto out_unregister_key_type; #endif rc = slow_work_register_user(THIS_MODULE); if (rc) goto out_unregister_resolver_key; return 0; out_unregister_resolver_key: #ifdef CONFIG_CIFS_DFS_UPCALL unregister_key_type(&key_type_dns_resolver); out_unregister_key_type: #endif #ifdef CONFIG_CIFS_UPCALL unregister_key_type(&cifs_spnego_key_type); out_unregister_filesystem: #endif unregister_filesystem(&cifs_fs_type); out_destroy_request_bufs: cifs_destroy_request_bufs(); out_destroy_mids: cifs_destroy_mids(); out_destroy_inodecache: cifs_destroy_inodecache(); out_clean_proc: cifs_proc_clean(); return rc; }
static void __exit exit_ospfs_fs(void) { unregister_filesystem(&ospfs_fs_type); eprintk("Unloading ospfs module\n"); }
static void __exit exit_minix_fs(void) { unregister_filesystem(&minix_fs_type); destroy_inodecache(); }
static void __exit exit_squashfs_fs(void) { unregister_filesystem(&squashfs_fs_type); destroy_inodecache(); }