Lines Matching full:sbi

42 	struct sysv_sb_info *sbi = SYSV_SB(sb);  in sv_sb_fic_inode()  local
44 if (sbi->s_bh1 == sbi->s_bh2) in sv_sb_fic_inode()
45 return &sbi->s_sb_fic_inodes[i]; in sv_sb_fic_inode()
50 return (sysv_ino_t*)(sbi->s_sbd1 + offset); in sv_sb_fic_inode()
52 return (sysv_ino_t*)(sbi->s_sbd2 + offset); in sv_sb_fic_inode()
59 struct sysv_sb_info *sbi = SYSV_SB(sb); in sysv_raw_inode() local
61 int block = sbi->s_firstinodezone + sbi->s_block_base; in sysv_raw_inode()
63 block += (ino-1) >> sbi->s_inodes_per_block_bits; in sysv_raw_inode()
68 return res + ((ino-1) & sbi->s_inodes_per_block_1); in sysv_raw_inode()
73 struct sysv_sb_info *sbi = SYSV_SB(sb); in refill_free_cache() local
82 while (ino <= sbi->s_ninodes) { in refill_free_cache()
85 if (i == sbi->s_fic_size) in refill_free_cache()
88 if ((ino++ & sbi->s_inodes_per_block_1) == 0) { in refill_free_cache()
104 struct sysv_sb_info *sbi = SYSV_SB(sb); in sysv_free_inode() local
112 if (ino <= SYSV_ROOT_INO || ino > sbi->s_ninodes) { in sysv_free_inode()
122 mutex_lock(&sbi->s_lock); in sysv_free_inode()
123 count = fs16_to_cpu(sbi, *sbi->s_sb_fic_count); in sysv_free_inode()
124 if (count < sbi->s_fic_size) { in sysv_free_inode()
125 *sv_sb_fic_inode(sb,count++) = cpu_to_fs16(sbi, ino); in sysv_free_inode()
126 *sbi->s_sb_fic_count = cpu_to_fs16(sbi, count); in sysv_free_inode()
128 fs16_add(sbi, sbi->s_sb_total_free_inodes, 1); in sysv_free_inode()
132 mutex_unlock(&sbi->s_lock); in sysv_free_inode()
139 struct sysv_sb_info *sbi = SYSV_SB(sb); in sysv_new_inode() local
151 mutex_lock(&sbi->s_lock); in sysv_new_inode()
152 count = fs16_to_cpu(sbi, *sbi->s_sb_fic_count); in sysv_new_inode()
157 mutex_unlock(&sbi->s_lock); in sysv_new_inode()
163 *sbi->s_sb_fic_count = cpu_to_fs16(sbi, count); in sysv_new_inode()
164 fs16_add(sbi, sbi->s_sb_total_free_inodes, -1); in sysv_new_inode()
167 inode->i_ino = fs16_to_cpu(sbi, ino); in sysv_new_inode()
178 mutex_unlock(&sbi->s_lock); in sysv_new_inode()
184 struct sysv_sb_info *sbi = SYSV_SB(sb); in sysv_count_free_inodes() local
189 mutex_lock(&sbi->s_lock); in sysv_count_free_inodes()
191 sb_count = fs16_to_cpu(sbi, *sbi->s_sb_total_free_inodes); in sysv_count_free_inodes()
202 while (ino <= sbi->s_ninodes) { in sysv_count_free_inodes()
205 if ((ino++ & sbi->s_inodes_per_block_1) == 0) { in sysv_count_free_inodes()
217 mutex_unlock(&sbi->s_lock); in sysv_count_free_inodes()
225 *sbi->s_sb_total_free_inodes = cpu_to_fs16(SYSV_SB(sb), count); in sysv_count_free_inodes()