aboutsummaryrefslogtreecommitdiffstats
path: root/net/iucv/af_iucv.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/iucv/af_iucv.c')
-rw-r--r--net/iucv/af_iucv.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c
index 95e38d3d2d74..f0dea1b8ed4b 100644
--- a/net/iucv/af_iucv.c
+++ b/net/iucv/af_iucv.c
@@ -965,7 +965,6 @@ static int iucv_sock_recvmsg(struct kiocb *iocb, struct socket *sock,
965 int noblock = flags & MSG_DONTWAIT; 965 int noblock = flags & MSG_DONTWAIT;
966 struct sock *sk = sock->sk; 966 struct sock *sk = sock->sk;
967 struct iucv_sock *iucv = iucv_sk(sk); 967 struct iucv_sock *iucv = iucv_sk(sk);
968 int target;
969 unsigned int copied, rlen; 968 unsigned int copied, rlen;
970 struct sk_buff *skb, *rskb, *cskb; 969 struct sk_buff *skb, *rskb, *cskb;
971 int err = 0; 970 int err = 0;
@@ -979,8 +978,6 @@ static int iucv_sock_recvmsg(struct kiocb *iocb, struct socket *sock,
979 if (flags & (MSG_OOB)) 978 if (flags & (MSG_OOB))
980 return -EOPNOTSUPP; 979 return -EOPNOTSUPP;
981 980
982 target = sock_rcvlowat(sk, flags & MSG_WAITALL, len);
983
984 skb = skb_recv_datagram(sk, flags, noblock, &err); 981 skb = skb_recv_datagram(sk, flags, noblock, &err);
985 if (!skb) { 982 if (!skb) {
986 if (sk->sk_shutdown & RCV_SHUTDOWN) 983 if (sk->sk_shutdown & RCV_SHUTDOWN)
@@ -993,10 +990,9 @@ static int iucv_sock_recvmsg(struct kiocb *iocb, struct socket *sock,
993 990
994 cskb = skb; 991 cskb = skb;
995 if (memcpy_toiovec(msg->msg_iov, cskb->data, copied)) { 992 if (memcpy_toiovec(msg->msg_iov, cskb->data, copied)) {
996 skb_queue_head(&sk->sk_receive_queue, skb); 993 if (!(flags & MSG_PEEK))
997 if (copied == 0) 994 skb_queue_head(&sk->sk_receive_queue, skb);
998 return -EFAULT; 995 return -EFAULT;
999 goto done;
1000 } 996 }
1001 997
1002 /* SOCK_SEQPACKET: set MSG_TRUNC if recv buf size is too small */ 998 /* SOCK_SEQPACKET: set MSG_TRUNC if recv buf size is too small */