Lines Matching refs:bh
113 struct buffer_head *bh; member
116 static inline void add_chain(Indirect *p, struct buffer_head *bh, __le32 *v) in add_chain() argument
119 p->bh = bh; in add_chain()
238 struct buffer_head *bh; in ext2_get_branch() local
246 bh = sb_bread(sb, le32_to_cpu(p->key)); in ext2_get_branch()
247 if (!bh) in ext2_get_branch()
252 add_chain(++p, bh, (__le32*)bh->b_data + *++offsets); in ext2_get_branch()
261 brelse(bh); in ext2_get_branch()
293 __le32 *start = ind->bh ? (__le32 *) ind->bh->b_data : ei->i_data; in ext2_find_near()
304 if (ind->bh) in ext2_find_near()
305 return ind->bh->b_blocknr; in ext2_find_near()
479 struct buffer_head *bh; in ext2_alloc_branch() local
499 bh = sb_getblk(inode->i_sb, new_blocks[n-1]); in ext2_alloc_branch()
500 if (unlikely(!bh)) { in ext2_alloc_branch()
504 branch[n].bh = bh; in ext2_alloc_branch()
505 lock_buffer(bh); in ext2_alloc_branch()
506 memset(bh->b_data, 0, blocksize); in ext2_alloc_branch()
507 branch[n].p = (__le32 *) bh->b_data + offsets[n]; in ext2_alloc_branch()
520 set_buffer_uptodate(bh); in ext2_alloc_branch()
521 unlock_buffer(bh); in ext2_alloc_branch()
522 mark_buffer_dirty_inode(bh, inode); in ext2_alloc_branch()
528 sync_dirty_buffer(bh); in ext2_alloc_branch()
535 bforget(branch[i].bh); in ext2_alloc_branch()
592 if (where->bh) in ext2_splice_branch()
593 mark_buffer_dirty_inode(where->bh, inode); in ext2_splice_branch()
691 brelse(partial->bh); in ext2_get_blocks()
759 brelse(partial->bh); in ext2_get_blocks()
977 for (p=partial; p>chain && all_zeroes((__le32*)p->bh->b_data,p->p); p--) in ext2_find_shared()
995 brelse(partial->bh); in ext2_find_shared()
1054 struct buffer_head * bh; in ext2_free_branches() local
1064 bh = sb_bread(inode->i_sb, nr); in ext2_free_branches()
1069 if (!bh) { in ext2_free_branches()
1076 (__le32*)bh->b_data, in ext2_free_branches()
1077 (__le32*)bh->b_data + addr_per_block, in ext2_free_branches()
1079 bforget(bh); in ext2_free_branches()
1124 mark_buffer_dirty_inode(partial->bh, inode); in __ext2_truncate_blocks()
1131 (__le32*)partial->bh->b_data+addr_per_block, in __ext2_truncate_blocks()
1133 mark_buffer_dirty_inode(partial->bh, inode); in __ext2_truncate_blocks()
1134 brelse (partial->bh); in __ext2_truncate_blocks()
1232 struct buffer_head * bh; in ext2_get_inode() local
1253 if (!(bh = sb_bread(sb, block))) in ext2_get_inode()
1256 *p = bh; in ext2_get_inode()
1258 return (struct ext2_inode *) (bh->b_data + offset); in ext2_get_inode()
1314 struct buffer_head * bh; in ext2_iget() local
1331 raw_inode = ext2_get_inode(inode->i_sb, ino, &bh); in ext2_iget()
1360 brelse (bh); in ext2_iget()
1425 brelse (bh); in ext2_iget()
1442 struct buffer_head * bh; in __ext2_write_inode() local
1443 struct ext2_inode * raw_inode = ext2_get_inode(sb, ino, &bh); in __ext2_write_inode()
1526 mark_buffer_dirty(bh); in __ext2_write_inode()
1528 sync_dirty_buffer(bh); in __ext2_write_inode()
1529 if (buffer_req(bh) && !buffer_uptodate(bh)) { in __ext2_write_inode()
1536 brelse (bh); in __ext2_write_inode()