Lines Matching refs:bh

15 static inline void dirty_indirect(struct buffer_head *bh, struct inode *inode)  in dirty_indirect()  argument
17 mark_buffer_dirty_inode(bh, inode); in dirty_indirect()
19 sync_dirty_buffer(bh); in dirty_indirect()
61 struct buffer_head *bh; member
66 static inline void add_chain(Indirect *p, struct buffer_head *bh, sysv_zone_t *v) in add_chain() argument
69 p->bh = bh; in add_chain()
79 static inline sysv_zone_t *block_end(struct buffer_head *bh) in block_end() argument
81 return (sysv_zone_t*)((char*)bh->b_data + bh->b_size); in block_end()
95 struct buffer_head *bh; in get_branch() local
103 bh = sb_bread(sb, block); in get_branch()
104 if (!bh) in get_branch()
108 add_chain(++p, bh, (sysv_zone_t*)bh->b_data + *++offsets); in get_branch()
115 brelse(bh); in get_branch()
135 struct buffer_head *bh; in alloc_branch() local
146 bh = sb_getblk(inode->i_sb, parent); in alloc_branch()
147 lock_buffer(bh); in alloc_branch()
148 memset(bh->b_data, 0, blocksize); in alloc_branch()
149 branch[n].bh = bh; in alloc_branch()
150 branch[n].p = (sysv_zone_t*) bh->b_data + offsets[n]; in alloc_branch()
152 set_buffer_uptodate(bh); in alloc_branch()
153 unlock_buffer(bh); in alloc_branch()
154 dirty_indirect(bh, inode); in alloc_branch()
161 bforget(branch[i].bh); in alloc_branch()
184 if (where->bh) in splice_branch()
185 dirty_indirect(where->bh, inode); in splice_branch()
196 bforget(where[i].bh); in splice_branch()
234 brelse(partial->bh); in get_block()
262 brelse(partial->bh); in get_block()
301 for (p=partial; p>chain && all_zeroes((sysv_zone_t*)p->bh->b_data,p->p); p--) in find_shared()
318 brelse(partial->bh); in find_shared()
339 struct buffer_head * bh; in free_branches() local
350 bh = sb_bread(sb, block); in free_branches()
351 if (!bh) in free_branches()
353 free_branches(inode, (sysv_zone_t*)bh->b_data, in free_branches()
354 block_end(bh), depth); in free_branches()
355 bforget(bh); in free_branches()
399 dirty_indirect(partial->bh, inode); in sysv_truncate()
404 free_branches(inode, partial->p + 1, block_end(partial->bh), in sysv_truncate()
406 dirty_indirect(partial->bh, inode); in sysv_truncate()
407 brelse (partial->bh); in sysv_truncate()