Lines Matching refs:bhs
1094 struct buffer_head **bhs, int nr_bhs) in fat_zeroed_cluster() argument
1104 bhs[n] = sb_getblk(sb, blknr); in fat_zeroed_cluster()
1105 if (!bhs[n]) { in fat_zeroed_cluster()
1110 lock_buffer(bhs[n]); in fat_zeroed_cluster()
1111 memset(bhs[n]->b_data, 0, sb->s_blocksize); in fat_zeroed_cluster()
1112 set_buffer_uptodate(bhs[n]); in fat_zeroed_cluster()
1113 unlock_buffer(bhs[n]); in fat_zeroed_cluster()
1114 mark_buffer_dirty_inode(bhs[n], dir); in fat_zeroed_cluster()
1120 err = fat_sync_bhs(bhs, n); in fat_zeroed_cluster()
1125 brelse(bhs[i]); in fat_zeroed_cluster()
1130 err = fat_sync_bhs(bhs, n); in fat_zeroed_cluster()
1135 brelse(bhs[i]); in fat_zeroed_cluster()
1141 bforget(bhs[i]); in fat_zeroed_cluster()
1149 struct buffer_head *bhs[MAX_BUF_PER_PAGE]; in fat_alloc_new_dir() local
1161 bhs[0] = sb_getblk(sb, blknr); in fat_alloc_new_dir()
1162 if (!bhs[0]) { in fat_alloc_new_dir()
1169 de = (struct msdos_dir_entry *)bhs[0]->b_data; in fat_alloc_new_dir()
1171 lock_buffer(bhs[0]); in fat_alloc_new_dir()
1193 set_buffer_uptodate(bhs[0]); in fat_alloc_new_dir()
1194 unlock_buffer(bhs[0]); in fat_alloc_new_dir()
1195 mark_buffer_dirty_inode(bhs[0], dir); in fat_alloc_new_dir()
1197 err = fat_zeroed_cluster(dir, blknr, 1, bhs, MAX_BUF_PER_PAGE); in fat_alloc_new_dir()
1216 struct buffer_head *bhs[MAX_BUF_PER_PAGE]; in fat_add_new_entries() local
1244 bhs[n] = sb_getblk(sb, blknr); in fat_add_new_entries()
1245 if (!bhs[n]) { in fat_add_new_entries()
1253 lock_buffer(bhs[n]); in fat_add_new_entries()
1254 memcpy(bhs[n]->b_data, slots, copy); in fat_add_new_entries()
1255 set_buffer_uptodate(bhs[n]); in fat_add_new_entries()
1256 unlock_buffer(bhs[n]); in fat_add_new_entries()
1257 mark_buffer_dirty_inode(bhs[n], dir); in fat_add_new_entries()
1267 memset(bhs[n]->b_data + copy, 0, sb->s_blocksize - copy); in fat_add_new_entries()
1269 get_bh(bhs[n]); in fat_add_new_entries()
1270 *bh = bhs[n]; in fat_add_new_entries()
1275 err = fat_zeroed_cluster(dir, start_blknr, ++n, bhs, MAX_BUF_PER_PAGE); in fat_add_new_entries()
1287 bforget(bhs[i]); in fat_add_new_entries()
1298 struct buffer_head *bh, *prev, *bhs[3]; /* 32*slots (672bytes) */ in fat_add_entries() local
1318 bhs[nr_bhs] = prev = bh; in fat_add_entries()
1326 brelse(bhs[i]); in fat_add_entries()
1358 memcpy(bhs[i]->b_data + offset, slots, copy); in fat_add_entries()
1359 mark_buffer_dirty_inode(bhs[i], dir); in fat_add_entries()
1365 err = fat_sync_bhs(bhs, long_bhs); in fat_add_entries()
1369 memcpy(bhs[i]->b_data + offset, slots, copy); in fat_add_entries()
1370 mark_buffer_dirty_inode(bhs[i], dir); in fat_add_entries()
1372 err = sync_dirty_buffer(bhs[i]); in fat_add_entries()
1375 brelse(bhs[i]); in fat_add_entries()
1417 brelse(bhs[i]); in fat_add_entries()