Lines Matching refs:trees

401 	struct buffer_tree trees[];  member
414 read_lock_bh(&bc->trees[cache_index(block, bc->num_locks)].u.spinlock); in cache_read_lock()
416 down_read(&bc->trees[cache_index(block, bc->num_locks)].u.lock); in cache_read_lock()
422 read_unlock_bh(&bc->trees[cache_index(block, bc->num_locks)].u.spinlock); in cache_read_unlock()
424 up_read(&bc->trees[cache_index(block, bc->num_locks)].u.lock); in cache_read_unlock()
430 write_lock_bh(&bc->trees[cache_index(block, bc->num_locks)].u.spinlock); in cache_write_lock()
432 down_write(&bc->trees[cache_index(block, bc->num_locks)].u.lock); in cache_write_lock()
438 write_unlock_bh(&bc->trees[cache_index(block, bc->num_locks)].u.spinlock); in cache_write_unlock()
440 up_write(&bc->trees[cache_index(block, bc->num_locks)].u.lock); in cache_write_unlock()
466 write_lock_bh(&lh->cache->trees[index].u.spinlock); in __lh_lock()
468 down_write(&lh->cache->trees[index].u.lock); in __lh_lock()
471 read_lock_bh(&lh->cache->trees[index].u.spinlock); in __lh_lock()
473 down_read(&lh->cache->trees[index].u.lock); in __lh_lock()
481 write_unlock_bh(&lh->cache->trees[index].u.spinlock); in __lh_unlock()
483 up_write(&lh->cache->trees[index].u.lock); in __lh_unlock()
486 read_unlock_bh(&lh->cache->trees[index].u.spinlock); in __lh_unlock()
488 up_read(&lh->cache->trees[index].u.lock); in __lh_unlock()
547 rwlock_init(&bc->trees[i].u.spinlock); in cache_init()
549 init_rwsem(&bc->trees[i].u.lock); in cache_init()
550 bc->trees[i].root = RB_ROOT; in cache_init()
562 WARN_ON_ONCE(!RB_EMPTY_ROOT(&bc->trees[i].root)); in cache_destroy()
620 b = __cache_get(&bc->trees[cache_index(block, bc->num_locks)].root, block); in cache_get()
694 rb_erase(&b->node, &bc->trees[cache_index(b->block, bc->num_locks)].root); in __cache_evict()
860 r = __cache_insert(&bc->trees[cache_index(b->block, bc->num_locks)].root, b); in cache_insert()
886 rb_erase(&b->node, &bc->trees[cache_index(b->block, bc->num_locks)].root); in cache_remove()
957 down_write(&bc->trees[i].u.lock); in cache_remove_range()
958 __remove_range(bc, &bc->trees[i].root, begin, end, pred, release); in cache_remove_range()
959 up_write(&bc->trees[i].u.lock); in cache_remove_range()