Lines Matching refs:bh

114 	struct buffer_head *bh;  member
117 static inline void add_chain(Indirect *p, struct buffer_head *bh, __le32 *v) in add_chain() argument
120 p->bh = bh; in add_chain()
239 struct buffer_head *bh; in ext2_get_branch() local
247 bh = sb_bread(sb, le32_to_cpu(p->key)); in ext2_get_branch()
248 if (!bh) in ext2_get_branch()
253 add_chain(++p, bh, (__le32*)bh->b_data + *++offsets); in ext2_get_branch()
262 brelse(bh); in ext2_get_branch()
294 __le32 *start = ind->bh ? (__le32 *) ind->bh->b_data : ei->i_data; in ext2_find_near()
305 if (ind->bh) in ext2_find_near()
306 return ind->bh->b_blocknr; in ext2_find_near()
480 struct buffer_head *bh; in ext2_alloc_branch() local
500 bh = sb_getblk(inode->i_sb, new_blocks[n-1]); in ext2_alloc_branch()
501 if (unlikely(!bh)) { in ext2_alloc_branch()
505 branch[n].bh = bh; in ext2_alloc_branch()
506 lock_buffer(bh); in ext2_alloc_branch()
507 memset(bh->b_data, 0, blocksize); in ext2_alloc_branch()
508 branch[n].p = (__le32 *) bh->b_data + offsets[n]; in ext2_alloc_branch()
521 set_buffer_uptodate(bh); in ext2_alloc_branch()
522 unlock_buffer(bh); in ext2_alloc_branch()
523 mark_buffer_dirty_inode(bh, inode); in ext2_alloc_branch()
529 sync_dirty_buffer(bh); in ext2_alloc_branch()
536 bforget(branch[i].bh); in ext2_alloc_branch()
593 if (where->bh) in ext2_splice_branch()
594 mark_buffer_dirty_inode(where->bh, inode); in ext2_splice_branch()
692 brelse(partial->bh); in ext2_get_blocks()
760 brelse(partial->bh); in ext2_get_blocks()
978 for (p=partial; p>chain && all_zeroes((__le32*)p->bh->b_data,p->p); p--) in ext2_find_shared()
996 brelse(partial->bh); in ext2_find_shared()
1055 struct buffer_head * bh; in ext2_free_branches() local
1065 bh = sb_bread(inode->i_sb, nr); in ext2_free_branches()
1070 if (!bh) { in ext2_free_branches()
1077 (__le32*)bh->b_data, in ext2_free_branches()
1078 (__le32*)bh->b_data + addr_per_block, in ext2_free_branches()
1080 bforget(bh); in ext2_free_branches()
1130 mark_buffer_dirty_inode(partial->bh, inode); in __ext2_truncate_blocks()
1137 (__le32*)partial->bh->b_data+addr_per_block, in __ext2_truncate_blocks()
1139 mark_buffer_dirty_inode(partial->bh, inode); in __ext2_truncate_blocks()
1140 brelse (partial->bh); in __ext2_truncate_blocks()
1243 struct buffer_head * bh; in ext2_get_inode() local
1264 if (!(bh = sb_bread(sb, block))) in ext2_get_inode()
1267 *p = bh; in ext2_get_inode()
1269 return (struct ext2_inode *) (bh->b_data + offset); in ext2_get_inode()
1325 struct buffer_head * bh; in ext2_iget() local
1342 raw_inode = ext2_get_inode(inode->i_sb, ino, &bh); in ext2_iget()
1371 brelse (bh); in ext2_iget()
1437 brelse (bh); in ext2_iget()
1454 struct buffer_head * bh; in __ext2_write_inode() local
1455 struct ext2_inode * raw_inode = ext2_get_inode(sb, ino, &bh); in __ext2_write_inode()
1538 mark_buffer_dirty(bh); in __ext2_write_inode()
1540 sync_dirty_buffer(bh); in __ext2_write_inode()
1541 if (buffer_req(bh) && !buffer_uptodate(bh)) { in __ext2_write_inode()
1548 brelse (bh); in __ext2_write_inode()