Lines Matching refs:bh
15 struct buffer_head *bh; in hpfs_prefetch_sectors() local
21 bh = sb_find_get_block(s, secno); in hpfs_prefetch_sectors()
22 if (bh) { in hpfs_prefetch_sectors()
23 if (buffer_uptodate(bh)) { in hpfs_prefetch_sectors()
24 brelse(bh); in hpfs_prefetch_sectors()
27 brelse(bh); in hpfs_prefetch_sectors()
46 struct buffer_head *bh; in hpfs_map_sector() local
54 *bhp = bh = sb_bread(s, secno); in hpfs_map_sector()
55 if (bh != NULL) in hpfs_map_sector()
56 return bh->b_data; in hpfs_map_sector()
67 struct buffer_head *bh; in hpfs_get_sector() local
74 if ((*bhp = bh = sb_getblk(s, secno)) != NULL) { in hpfs_get_sector()
75 if (!buffer_uptodate(bh)) wait_on_buffer(bh); in hpfs_get_sector()
76 set_buffer_uptodate(bh); in hpfs_get_sector()
77 return bh->b_data; in hpfs_get_sector()
102 if (!(qbh->bh[0] = sb_bread(s, secno + 0))) goto bail0; in hpfs_map_4sectors()
103 if (!(qbh->bh[1] = sb_bread(s, secno + 1))) goto bail1; in hpfs_map_4sectors()
104 if (!(qbh->bh[2] = sb_bread(s, secno + 2))) goto bail2; in hpfs_map_4sectors()
105 if (!(qbh->bh[3] = sb_bread(s, secno + 3))) goto bail3; in hpfs_map_4sectors()
107 if (likely(qbh->bh[1]->b_data == qbh->bh[0]->b_data + 1 * 512) && in hpfs_map_4sectors()
108 likely(qbh->bh[2]->b_data == qbh->bh[0]->b_data + 2 * 512) && in hpfs_map_4sectors()
109 likely(qbh->bh[3]->b_data == qbh->bh[0]->b_data + 3 * 512)) { in hpfs_map_4sectors()
110 return qbh->data = qbh->bh[0]->b_data; in hpfs_map_4sectors()
119 memcpy(data + 0 * 512, qbh->bh[0]->b_data, 512); in hpfs_map_4sectors()
120 memcpy(data + 1 * 512, qbh->bh[1]->b_data, 512); in hpfs_map_4sectors()
121 memcpy(data + 2 * 512, qbh->bh[2]->b_data, 512); in hpfs_map_4sectors()
122 memcpy(data + 3 * 512, qbh->bh[3]->b_data, 512); in hpfs_map_4sectors()
127 brelse(qbh->bh[3]); in hpfs_map_4sectors()
129 brelse(qbh->bh[2]); in hpfs_map_4sectors()
131 brelse(qbh->bh[1]); in hpfs_map_4sectors()
133 brelse(qbh->bh[0]); in hpfs_map_4sectors()
152 if (!hpfs_get_sector(s, secno + 0, &qbh->bh[0])) goto bail0; in hpfs_get_4sectors()
153 if (!hpfs_get_sector(s, secno + 1, &qbh->bh[1])) goto bail1; in hpfs_get_4sectors()
154 if (!hpfs_get_sector(s, secno + 2, &qbh->bh[2])) goto bail2; in hpfs_get_4sectors()
155 if (!hpfs_get_sector(s, secno + 3, &qbh->bh[3])) goto bail3; in hpfs_get_4sectors()
157 if (likely(qbh->bh[1]->b_data == qbh->bh[0]->b_data + 1 * 512) && in hpfs_get_4sectors()
158 likely(qbh->bh[2]->b_data == qbh->bh[0]->b_data + 2 * 512) && in hpfs_get_4sectors()
159 likely(qbh->bh[3]->b_data == qbh->bh[0]->b_data + 3 * 512)) { in hpfs_get_4sectors()
160 return qbh->data = qbh->bh[0]->b_data; in hpfs_get_4sectors()
170 brelse(qbh->bh[3]); in hpfs_get_4sectors()
172 brelse(qbh->bh[2]); in hpfs_get_4sectors()
174 brelse(qbh->bh[1]); in hpfs_get_4sectors()
176 brelse(qbh->bh[0]); in hpfs_get_4sectors()
184 if (unlikely(qbh->data != qbh->bh[0]->b_data)) in hpfs_brelse4()
186 brelse(qbh->bh[0]); in hpfs_brelse4()
187 brelse(qbh->bh[1]); in hpfs_brelse4()
188 brelse(qbh->bh[2]); in hpfs_brelse4()
189 brelse(qbh->bh[3]); in hpfs_brelse4()
194 if (unlikely(qbh->data != qbh->bh[0]->b_data)) { in hpfs_mark_4buffers_dirty()
195 memcpy(qbh->bh[0]->b_data, qbh->data + 0 * 512, 512); in hpfs_mark_4buffers_dirty()
196 memcpy(qbh->bh[1]->b_data, qbh->data + 1 * 512, 512); in hpfs_mark_4buffers_dirty()
197 memcpy(qbh->bh[2]->b_data, qbh->data + 2 * 512, 512); in hpfs_mark_4buffers_dirty()
198 memcpy(qbh->bh[3]->b_data, qbh->data + 3 * 512, 512); in hpfs_mark_4buffers_dirty()
200 mark_buffer_dirty(qbh->bh[0]); in hpfs_mark_4buffers_dirty()
201 mark_buffer_dirty(qbh->bh[1]); in hpfs_mark_4buffers_dirty()
202 mark_buffer_dirty(qbh->bh[2]); in hpfs_mark_4buffers_dirty()
203 mark_buffer_dirty(qbh->bh[3]); in hpfs_mark_4buffers_dirty()