Lines Matching defs:bh
7 struct buffer_head *bh;
12 static inline void add_chain(Indirect *p, struct buffer_head *bh, block_t *v)
15 p->bh = bh;
25 static inline block_t *block_end(struct buffer_head *bh)
27 return (block_t *)((char*)bh->b_data + bh->b_size);
38 struct buffer_head *bh;
46 bh = sb_bread(sb, block_to_cpu(p->key));
47 if (!bh)
52 add_chain(++p, bh, (block_t *)bh->b_data + *++offsets);
61 brelse(bh);
82 struct buffer_head *bh;
88 bh = sb_getblk(inode->i_sb, parent);
89 if (!bh) {
94 lock_buffer(bh);
95 memset(bh->b_data, 0, bh->b_size);
96 branch[n].bh = bh;
97 branch[n].p = (block_t*) bh->b_data + offsets[n];
99 set_buffer_uptodate(bh);
100 unlock_buffer(bh);
101 mark_buffer_dirty_inode(bh, inode);
109 bforget(branch[i].bh);
137 if (where->bh)
138 mark_buffer_dirty_inode(where->bh, inode);
146 bforget(where[i].bh);
153 struct buffer_head *bh, int create)
171 map_bh(bh, inode->i_sb, block_to_cpu(chain[depth-1].key));
181 brelse(partial->bh);
204 set_buffer_new(bh);
209 brelse(partial->bh);
244 for (p=partial;p>chain && all_zeroes((block_t*)p->bh->b_data,p->p);p--)
256 brelse(partial->bh);
278 struct buffer_head * bh;
287 bh = sb_bread(inode->i_sb, nr);
288 if (!bh)
290 free_branches(inode, (block_t*)bh->b_data,
291 block_end(bh), depth);
292 bforget(bh);
331 mark_buffer_dirty_inode(partial->bh, inode);
336 free_branches(inode, partial->p + 1, block_end(partial->bh),
338 mark_buffer_dirty_inode(partial->bh, inode);
339 brelse (partial->bh);