Skip to content

Commit

Permalink
RxRPC: Fix the conversion to iov_iter
Browse files Browse the repository at this point in the history
This commit:

	commit af2b040
	Author: Al Viro <[email protected]>
	Date:   Thu Nov 27 21:44:24 2014 -0500
	Subject: rxrpc: switch rxrpc_send_data() to iov_iter primitives

incorrectly changes a do-while loop into a while loop in rxrpc_send_data().

Unfortunately, at least one pass through the loop is required - even if
there is no data - so that the packet the closes the send phase can be
sent if MSG_MORE is not set.

Signed-off-by: David Howells <[email protected]>
  • Loading branch information
dhowells committed Apr 1, 2015
1 parent 6c310bc commit 3af6878
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/rxrpc/ar-output.c
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ static int rxrpc_send_data(struct kiocb *iocb,
copied = 0;
if (len > iov_iter_count(&msg->msg_iter))
len = iov_iter_count(&msg->msg_iter);
while (len) {
do {
int copy;

if (!skb) {
Expand Down Expand Up @@ -689,7 +689,7 @@ static int rxrpc_send_data(struct kiocb *iocb,
rxrpc_queue_packet(call, skb, !iov_iter_count(&msg->msg_iter) && !more);
skb = NULL;
}
}
} while (len > 0);

success:
ret = copied;
Expand Down

0 comments on commit 3af6878

Please sign in to comment.