Lines Matching refs:qbh

86 void *hpfs_map_4sectors(struct super_block *s, unsigned secno, struct quad_buffer_head *qbh,  in hpfs_map_4sectors()  argument
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()
113 qbh->data = data = kmalloc(2048, GFP_NOFS); 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()
141 struct quad_buffer_head *qbh) in hpfs_get_4sectors() argument
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()
163 if (!(qbh->data = kmalloc(2048, GFP_NOFS))) { in hpfs_get_4sectors()
167 return qbh->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()
182 void hpfs_brelse4(struct quad_buffer_head *qbh) in hpfs_brelse4() argument
184 if (unlikely(qbh->data != qbh->bh[0]->b_data)) in hpfs_brelse4()
185 kfree(qbh->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()
192 void hpfs_mark_4buffers_dirty(struct quad_buffer_head *qbh) in hpfs_mark_4buffers_dirty() argument
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()