}
if (li->esize) {
/* need to close old extent */
- p = li->data - 6;;
+ p = li->data - 6;
encode16(p, li->esize);
li->esize = 0;
}
ephys += overlap;
}
if (handled < hlen) {
- if (elen) {
- buf -= 12;
- *bufp = buf;
- encode48(buf, ephys);
- encode16(buf, elen);
- encode32(buf, eaddr);
- } else
+ if (elen)
+ *bufp = buf - 12;
+ else
*bufp = buf;
return ui->pending_addr[uinum].fileaddr
+ uioffset + handled;
* those in ui will not fill buf.
* So shift the buf extents up to the top of the buffer,
* then merge the remaining ui extents in.
- * The first extent may be partially processed already, but
- * if so, walk_extent modified it so we don't need to care.
+ * The first extent may be partially processed already, so
+ * we might need to adjust it.
*/
/* Find end of index list. Could use a binary search,
* but not now.
b2 -= 12;
break;
}
+ if (eaddr < next) {
+ int handled = next - eaddr;
+ BUG_ON(eaddr + elen <= next);
+ b2 -= 12;
+ BUG_ON(b2 != buf);
+ encode48(b2, ephys + handled);
+ encode16(b2, elen - handled);
+ encode32(b2, next);
+ }
}
/* Data we want extends from buf up to b2
* Move it to end of ibuf
/* new needs a B_Credit and a B_ICredit.
*/
- uit.credits--;;
+ uit.credits--;
set_bit(B_Credit, &new->b.flags);
if (uit.credits > 0){
set_bit(B_ICredit, &new->b.flags);