Lines Matching refs:im
515 struct inode_management *im = &sbi->im[type]; in __add_ino_entry() local
520 e = radix_tree_lookup(&im->ino_root, ino); in __add_ino_entry()
531 spin_lock(&im->ino_lock); in __add_ino_entry()
532 e = radix_tree_lookup(&im->ino_root, ino); in __add_ino_entry()
535 spin_unlock(&im->ino_lock); in __add_ino_entry()
540 if (unlikely(radix_tree_insert(&im->ino_root, ino, e))) in __add_ino_entry()
546 list_add_tail(&e->list, &im->ino_list); in __add_ino_entry()
548 im->ino_num++; in __add_ino_entry()
554 spin_unlock(&im->ino_lock); in __add_ino_entry()
563 struct inode_management *im = &sbi->im[type]; in __remove_ino_entry() local
566 spin_lock(&im->ino_lock); in __remove_ino_entry()
567 e = radix_tree_lookup(&im->ino_root, ino); in __remove_ino_entry()
570 radix_tree_delete(&im->ino_root, ino); in __remove_ino_entry()
571 im->ino_num--; in __remove_ino_entry()
572 spin_unlock(&im->ino_lock); in __remove_ino_entry()
576 spin_unlock(&im->ino_lock); in __remove_ino_entry()
594 struct inode_management *im = &sbi->im[mode]; in f2fs_exist_written_data() local
597 spin_lock(&im->ino_lock); in f2fs_exist_written_data()
598 e = radix_tree_lookup(&im->ino_root, ino); in f2fs_exist_written_data()
599 spin_unlock(&im->ino_lock); in f2fs_exist_written_data()
609 struct inode_management *im = &sbi->im[i]; in f2fs_release_ino_entry() local
611 spin_lock(&im->ino_lock); in f2fs_release_ino_entry()
612 list_for_each_entry_safe(e, tmp, &im->ino_list, list) { in f2fs_release_ino_entry()
614 radix_tree_delete(&im->ino_root, e->ino); in f2fs_release_ino_entry()
616 im->ino_num--; in f2fs_release_ino_entry()
618 spin_unlock(&im->ino_lock); in f2fs_release_ino_entry()
631 struct inode_management *im = &sbi->im[type]; in f2fs_is_dirty_device() local
635 spin_lock(&im->ino_lock); in f2fs_is_dirty_device()
636 e = radix_tree_lookup(&im->ino_root, ino); in f2fs_is_dirty_device()
639 spin_unlock(&im->ino_lock); in f2fs_is_dirty_device()
645 struct inode_management *im = &sbi->im[ORPHAN_INO]; in f2fs_acquire_orphan_inode() local
648 spin_lock(&im->ino_lock); in f2fs_acquire_orphan_inode()
651 spin_unlock(&im->ino_lock); in f2fs_acquire_orphan_inode()
655 if (unlikely(im->ino_num >= sbi->max_orphans)) in f2fs_acquire_orphan_inode()
658 im->ino_num++; in f2fs_acquire_orphan_inode()
659 spin_unlock(&im->ino_lock); in f2fs_acquire_orphan_inode()
666 struct inode_management *im = &sbi->im[ORPHAN_INO]; in f2fs_release_orphan_inode() local
668 spin_lock(&im->ino_lock); in f2fs_release_orphan_inode()
669 f2fs_bug_on(sbi, im->ino_num == 0); in f2fs_release_orphan_inode()
670 im->ino_num--; in f2fs_release_orphan_inode()
671 spin_unlock(&im->ino_lock); in f2fs_release_orphan_inode()
792 struct inode_management *im = &sbi->im[ORPHAN_INO]; in write_orphan_inodes() local
794 orphan_blocks = GET_ORPHAN_BLOCKS(im->ino_num); in write_orphan_inodes()
801 head = &im->ino_list; in write_orphan_inodes()
1332 unsigned long orphan_num = sbi->im[ORPHAN_INO].ino_num; in update_ckpt_flags()
1465 unsigned long orphan_num = sbi->im[ORPHAN_INO].ino_num, flags; in do_checkpoint()
1736 struct inode_management *im = &sbi->im[i]; in f2fs_init_ino_entry_info() local
1738 INIT_RADIX_TREE(&im->ino_root, GFP_ATOMIC); in f2fs_init_ino_entry_info()
1739 spin_lock_init(&im->ino_lock); in f2fs_init_ino_entry_info()
1740 INIT_LIST_HEAD(&im->ino_list); in f2fs_init_ino_entry_info()
1741 im->ino_num = 0; in f2fs_init_ino_entry_info()