9 #include <linux/string.h>
10 #include <linux/slab.h>
35 for (i = 0; i <
count; i++)
36 if (!(ubh->
bh[i] = sb_bread(sb, fragment + i)))
42 for (j = 0; j <
i; j++)
59 USPI_UBH(uspi)->count =
count;
60 for (i = 0; i <
count; i++)
61 if (!(USPI_UBH(uspi)->
bh[i] = sb_bread(sb, fragment + i)))
64 USPI_UBH(uspi)->bh[
i] =
NULL;
65 return USPI_UBH(uspi);
67 for (j = 0; j <
i; j++)
68 brelse (USPI_UBH(uspi)->
bh[j]);
77 for (i = 0; i < ubh->
count; i++)
87 for ( i = 0; i < USPI_UBH(uspi)->count; i++ ) {
88 brelse (USPI_UBH(uspi)->
bh[i]);
89 USPI_UBH(uspi)->bh[
i] =
NULL;
98 for ( i = 0; i < ubh->
count; i++ )
108 for ( i = 0; i < ubh->
count; i++ )
109 set_buffer_uptodate (ubh->
bh[i]);
111 for ( i = 0; i < ubh->
count; i++ )
112 clear_buffer_uptodate (ubh->
bh[i]);
121 for (i = 0; i < ubh->
count; i++)
124 for (i = 0; i < ubh->
count; i++)
125 wait_on_buffer(ubh->
bh[i]);
134 for ( i = 0; i < ubh->
count; i++ )
if ( ubh->
bh[i] )
135 bforget (ubh->
bh[i]);
144 for ( i = 0; i < ubh->
count; i++ )
145 result |= buffer_dirty(ubh->
bh[i]);
158 memcpy (mem, ubh->
bh[bhno]->b_data, len);
174 memcpy (ubh->
bh[bhno]->b_data, mem, len);
191 switch (UFS_SB(sb)->
s_flags & UFS_ST_MASK) {
194 if ((fs32 & 0xffff0000) == 0 ||
195 (fs32 & 0xffff0000) == 0xffff0000)
196 dev = old_decode_dev(fs32 & 0x7fff);
198 dev =
MKDEV(sysv_major(fs32), sysv_minor(fs32));
202 dev = old_decode_dev(fs32);
216 fs32 = sysv_encode_dev(dev);
217 if ((fs32 & 0xffff8000) == 0) {
218 fs32 = old_encode_dev(dev);
223 fs32 = old_encode_dev(dev);
251 page = read_mapping_page(mapping, index,
NULL);
255 "read_mapping_page error: ino %lu, index: %lu\n",
256 mapping->
host->i_ino, index);
270 if (!PageUptodate(page) || PageError(page)) {
275 "can not read page: ino %lu, index: %lu\n",
276 mapping->
host->i_ino, index);
278 page = ERR_PTR(-
EIO);