diff options
author | David S. Miller <davem@davemloft.net> | 2016-04-14 07:39:15 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-04-14 07:39:15 +0300 |
commit | 6c61403daea578dcfe84f187c204db1a3fa3d6ae (patch) | |
tree | 76418aa08d196b20920d6ec94dc2b586c1ff2c3f /drivers/target | |
parent | 743b03a83297690f0bd38c452a3bbb47d2be300a (diff) | |
parent | 2da62906b1e298695e1bb725927041cd59942c98 (diff) | |
download | linux-6c61403daea578dcfe84f187c204db1a3fa3d6ae.tar.xz |
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.c | 5 |
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); |