예제 #1
0
void nilfs_btnode_cache_init_once(struct address_space *btnc)
{
	INIT_RADIX_TREE(&btnc->page_tree, GFP_ATOMIC);
	spin_lock_init(&btnc->tree_lock);
	INIT_LIST_HEAD(&btnc->private_list);
	spin_lock_init(&btnc->private_lock);

	spin_lock_init(&btnc->i_mmap_lock);
	INIT_RAW_PRIO_TREE_ROOT(&btnc->i_mmap);
	INIT_LIST_HEAD(&btnc->i_mmap_nonlinear);
}
예제 #2
0
파일: main.c 프로젝트: 285452612/ali_kernel
static void gfs2_init_gl_aspace_once(void *foo)
{
	struct gfs2_glock *gl = foo;
	struct address_space *mapping = (struct address_space *)(gl + 1);

	gfs2_init_glock_once(gl);
	memset(mapping, 0, sizeof(*mapping));
	INIT_RADIX_TREE(&mapping->page_tree, GFP_ATOMIC);
	spin_lock_init(&mapping->tree_lock);
	spin_lock_init(&mapping->i_mmap_lock);
	INIT_LIST_HEAD(&mapping->private_list);
	spin_lock_init(&mapping->private_lock);
	INIT_RAW_PRIO_TREE_ROOT(&mapping->i_mmap);
	INIT_LIST_HEAD(&mapping->i_mmap_nonlinear);
}
void nilfs_btnode_cache_init_once(struct address_space *btnc)
{
	INIT_RADIX_TREE(&btnc->page_tree, GFP_ATOMIC);
#if HAVE_LOCKLESS_PAGECACHE
	spin_lock_init(&btnc->tree_lock);
#else
	rwlock_init(&btnc->tree_lock);
#endif
	INIT_LIST_HEAD(&btnc->private_list);
	spin_lock_init(&btnc->private_lock);
	/* Are those initialization needed? */
	spin_lock_init(&btnc->i_mmap_lock);
	INIT_RAW_PRIO_TREE_ROOT(&btnc->i_mmap);
	INIT_LIST_HEAD(&btnc->i_mmap_nonlinear);
}