浏览代码

[AF_RXRPC]: Return the number of bytes buffered in rxrpc_send_data()

Return the number of bytes buffered in rxrpc_send_data().

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David Howells 18 年之前
父节点
当前提交
19e6454ca7
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      net/rxrpc/ar-output.c

+ 4 - 1
net/rxrpc/ar-output.c

@@ -640,6 +640,7 @@ static int rxrpc_send_data(struct kiocb *iocb,
 			goto efault;
 			goto efault;
 		sp->remain -= copy;
 		sp->remain -= copy;
 		skb->mark += copy;
 		skb->mark += copy;
+		copied += copy;
 
 
 		len -= copy;
 		len -= copy;
 		segment -= copy;
 		segment -= copy;
@@ -709,6 +710,8 @@ static int rxrpc_send_data(struct kiocb *iocb,
 
 
 	} while (segment > 0);
 	} while (segment > 0);
 
 
+success:
+	ret = copied;
 out:
 out:
 	call->tx_pending = skb;
 	call->tx_pending = skb;
 	_leave(" = %d", ret);
 	_leave(" = %d", ret);
@@ -725,7 +728,7 @@ call_aborted:
 
 
 maybe_error:
 maybe_error:
 	if (copied)
 	if (copied)
-		ret = copied;
+		goto success;
 	goto out;
 	goto out;
 
 
 efault:
 efault: