summaryrefslogtreecommitdiffstats
path: root/drivers/target
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2016-04-14 06:39:15 +0200
committerDavid S. Miller <davem@davemloft.net>2016-04-14 06:39:15 +0200
commit6c61403daea578dcfe84f187c204db1a3fa3d6ae (patch)
tree76418aa08d196b20920d6ec94dc2b586c1ff2c3f /drivers/target
parentnet: remove netdevice gso_min_segs (diff)
parent[net] drop 'size' argument of sock_recvmsg() (diff)
downloadlinux-6c61403daea578dcfe84f187c204db1a3fa3d6ae.tar.xz
linux-6c61403daea578dcfe84f187c204db1a3fa3d6ae.zip
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Diffstat (limited to 'drivers/target')
-rw-r--r--drivers/target/iscsi/iscsi_target_util.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/target/iscsi/iscsi_target_util.c b/drivers/target/iscsi/iscsi_target_util.c
index 428b0d9e3dba..57720385a751 100644
--- a/drivers/target/iscsi/iscsi_target_util.c
+++ b/drivers/target/iscsi/iscsi_target_util.c
@@ -1283,9 +1283,8 @@ static int iscsit_do_rx_data(
iov_iter_kvec(&msg.msg_iter, READ | ITER_KVEC,
count->iov, count->iov_count, data);
- while (total_rx < data) {
- rx_loop = sock_recvmsg(conn->sock, &msg,
- (data - total_rx), MSG_WAITALL);
+ while (msg_data_left(&msg)) {
+ rx_loop = sock_recvmsg(conn->sock, &msg, MSG_WAITALL);
if (rx_loop <= 0) {
pr_debug("rx_loop: %d total_rx: %d\n",
rx_loop, total_rx);