void vfs_deallocate( struct vfs *vfsp) { bhv_head_destroy(VFS_BHVHEAD(vfsp)); kmem_free(vfsp, sizeof(vfs_t)); }
vfs_t * vfs_allocate( void ) { struct vfs *vfsp; vfsp = kmem_zalloc(sizeof(vfs_t), KM_SLEEP); bhv_head_init(VFS_BHVHEAD(vfsp), "vfs"); init_waitqueue_head(&vfsp->vfs_wait_sync_task); return vfsp; }
vfs_t * vfs_allocate( void ) { struct vfs *vfsp; vfsp = kmem_zalloc(sizeof(vfs_t), KM_SLEEP); bhv_head_init(VFS_BHVHEAD(vfsp), "vfs"); INIT_LIST_HEAD(&vfsp->vfs_sync_list); spin_lock_init(&vfsp->vfs_sync_lock); init_waitqueue_head(&vfsp->vfs_wait_single_sync_task); return vfsp; }
void bhv_remove_all_vfsops( struct vfs *vfsp, int freebase) { struct xfs_mount *mp; bhv_remove_vfsops(vfsp, VFS_POSITION_QM); bhv_remove_vfsops(vfsp, VFS_POSITION_DM); if (!freebase) return; mp = XFS_BHVTOM(bhv_lookup(VFS_BHVHEAD(vfsp), &xfs_vfsops)); VFS_REMOVEBHV(vfsp, &mp->m_bhv); xfs_mount_free(mp, 0); }