max &= ~(call->conn->size_align - 1UL);
chunk = max;
- if (chunk > len)
+ if (chunk > len && !more)
chunk = len;
space = chunk + call->conn->size_align;
goto efault;
sp->remain -= copy;
skb->mark += copy;
+ copied += copy;
len -= copy;
segment -= copy;
} while (segment > 0);
+success:
+ ret = copied;
out:
call->tx_pending = skb;
_leave(" = %d", ret);
maybe_error:
if (copied)
- ret = copied;
+ goto success;
goto out;
efault: