18 #include <linux/string.h>
30 struct buffer_head *
tmp, *bha[16];
40 dir->
i_sb->s_blocksize,
54 int lextoffset = epos->
offset;
55 unsigned char blocksize_bits = dir->
i_sb->s_blocksize_bits;
61 block = udf_get_lb_pblock(dir->
i_sb, eloc, *offset);
65 if ((*offset << blocksize_bits) >= *elen)
76 if (!(*offset & ((16 >> (blocksize_bits - 9)) - 1))) {
77 i = 16 >> (blocksize_bits - 9);
78 if (i + *offset > (*elen >> blocksize_bits))
79 i = (*elen >> blocksize_bits)-*
offset;
80 for (num = 0; i > 0; i--) {
81 block = udf_get_lb_pblock(dir->
i_sb, eloc,
84 if (tmp && !buffer_uptodate(tmp) &&
92 for (i = 0; i < num; i++)
96 }
else if (fibh->
sbh != fibh->
ebh) {
112 }
else if (fibh->
eoffset > dir->
i_sb->s_blocksize) {
113 int lextoffset = epos->
offset;
119 block = udf_get_lb_pblock(dir->
i_sb, eloc, *offset);
123 if ((*offset << dir->
i_sb->s_blocksize_bits) >= *elen)
126 epos->
offset = lextoffset;
144 cfi->lengthFileIdent +
145 le16_to_cpu(cfi->lengthOfImpUse) + 3) & ~3;
164 if ((!buffer) || (!offset)) {
165 udf_debug(
"invalidparms, buffer=%p, offset=%p\n",
172 if ((*offset > 0) && (*offset < bufsize))
178 udf_debug(
"offset: %u sizeof: %lu bufsize: %u\n",
187 fi->lengthFileIdent + le16_to_cpu(fi->lengthOfImpUse);
193 *offset = *offset + lengthThisIdent;
203 if ((!ptr) || (!offset)) {
204 pr_err(
"%s: invalidparms\n", __func__);
208 if ((*offset +
sizeof(
struct short_ad)) > maxoffset)
225 if ((!ptr) || (!offset)) {
226 pr_err(
"%s: invalidparms\n", __func__);
230 if ((*offset +
sizeof(
struct long_ad)) > maxoffset)
239 *offset +=
sizeof(
struct long_ad);