8 #include <linux/sched.h>
9 #include <linux/slab.h>
17 struct buffer_head *bh;
23 *bhp = bh = sb_bread(s, secno);
27 printk(
"HPFS: hpfs_map_sector: read error\n");
36 struct buffer_head *bh;
43 if ((*bhp = bh = sb_getblk(s, secno)) !=
NULL) {
44 if (!buffer_uptodate(bh)) wait_on_buffer(bh);
45 set_buffer_uptodate(bh);
48 printk(
"HPFS: hpfs_get_sector: getblk failed\n");
58 struct buffer_head *bh;
66 printk(
"HPFS: hpfs_map_4sectors: unaligned read\n");
72 printk(
"HPFS: hpfs_map_4sectors: out of memory\n");
76 qbh->
bh[0] = bh = sb_bread(s, secno);
79 memcpy(data, bh->b_data, 512);
81 qbh->
bh[1] = bh = sb_bread(s, secno + 1);
84 memcpy(data + 512, bh->b_data, 512);
86 qbh->
bh[2] = bh = sb_bread(s, secno + 2);
89 memcpy(data + 2 * 512, bh->b_data, 512);
91 qbh->
bh[3] = bh = sb_bread(s, secno + 3);
94 memcpy(data + 3 * 512, bh->b_data, 512);
106 printk(
"HPFS: hpfs_map_4sectors: read error\n");
121 printk(
"HPFS: hpfs_get_4sectors: unaligned read\n");
127 printk(
"HPFS: hpfs_get_4sectors: out of memory\n");
140 bail3: brelse(qbh->
bh[2]);
141 bail2: brelse(qbh->
bh[1]);
142 bail1: brelse(qbh->
bh[0]);