diff options
author | David Howells <dhowells@redhat.com> | 2015-04-01 09:06:00 -0400 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2015-04-01 09:06:00 -0400 |
commit | 3af6878ecad229346fbc2c8f2663089aa6aef20d (patch) | |
tree | 286d1ea04a97305a0b97f62f505081027b98b5bd /net | |
parent | 6c310bc1acdd02110182a2ec6efa3e7571a3b80c (diff) |
RxRPC: Fix the conversion to iov_iter
This commit:
commit af2b040e470b470bfc881981db3c796072853eae
Author: Al Viro <viro@zeniv.linux.org.uk>
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 <dhowells@redhat.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/rxrpc/ar-output.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/rxrpc/ar-output.c b/net/rxrpc/ar-output.c index 8331c95e1522..833a33b5c180 100644 --- a/net/rxrpc/ar-output.c +++ b/net/rxrpc/ar-output.c | |||
@@ -548,7 +548,7 @@ static int rxrpc_send_data(struct kiocb *iocb, | |||
548 | copied = 0; | 548 | copied = 0; |
549 | if (len > iov_iter_count(&msg->msg_iter)) | 549 | if (len > iov_iter_count(&msg->msg_iter)) |
550 | len = iov_iter_count(&msg->msg_iter); | 550 | len = iov_iter_count(&msg->msg_iter); |
551 | while (len) { | 551 | do { |
552 | int copy; | 552 | int copy; |
553 | 553 | ||
554 | if (!skb) { | 554 | if (!skb) { |
@@ -689,7 +689,7 @@ static int rxrpc_send_data(struct kiocb *iocb, | |||
689 | rxrpc_queue_packet(call, skb, !iov_iter_count(&msg->msg_iter) && !more); | 689 | rxrpc_queue_packet(call, skb, !iov_iter_count(&msg->msg_iter) && !more); |
690 | skb = NULL; | 690 | skb = NULL; |
691 | } | 691 | } |
692 | } | 692 | } while (len > 0); |
693 | 693 | ||
694 | success: | 694 | success: |
695 | ret = copied; | 695 | ret = copied; |