X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=net%2Frxrpc%2Far-output.c;h=cc9102c5b588319e09b9769302bd5704e9bfb8e3;hb=e5a4a72d4f88f4389e9340d383ca67031d1b8536;hp=5cdde4a48ed1efb95b624f39b4c225d373f6066c;hpb=98b96173c777c67daaa7d163a35e591e1928a164;p=linux-2.6 diff --git a/net/rxrpc/ar-output.c b/net/rxrpc/ar-output.c index 5cdde4a48e..cc9102c5b5 100644 --- a/net/rxrpc/ar-output.c +++ b/net/rxrpc/ar-output.c @@ -582,7 +582,7 @@ static int rxrpc_send_data(struct kiocb *iocb, max &= ~(call->conn->size_align - 1UL); chunk = max; - if (chunk > len) + if (chunk > len && !more) chunk = len; space = chunk + call->conn->size_align; @@ -640,6 +640,7 @@ static int rxrpc_send_data(struct kiocb *iocb, goto efault; sp->remain -= copy; skb->mark += copy; + copied += copy; len -= copy; segment -= copy; @@ -709,6 +710,8 @@ static int rxrpc_send_data(struct kiocb *iocb, } while (segment > 0); +success: + ret = copied; out: call->tx_pending = skb; _leave(" = %d", ret); @@ -725,7 +728,7 @@ call_aborted: maybe_error: if (copied) - ret = copied; + goto success; goto out; efault: