|
@@ -1808,27 +1808,8 @@ vsock_stream_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
|
|
|
else if (sk->sk_shutdown & RCV_SHUTDOWN)
|
|
|
err = 0;
|
|
|
|
|
|
- if (copied > 0) {
|
|
|
- /* We only do these additional bookkeeping/notification steps
|
|
|
- * if we actually copied something out of the queue pair
|
|
|
- * instead of just peeking ahead.
|
|
|
- */
|
|
|
-
|
|
|
- if (!(flags & MSG_PEEK)) {
|
|
|
- /* If the other side has shutdown for sending and there
|
|
|
- * is nothing more to read, then modify the socket
|
|
|
- * state.
|
|
|
- */
|
|
|
- if (vsk->peer_shutdown & SEND_SHUTDOWN) {
|
|
|
- if (vsock_stream_has_data(vsk) <= 0) {
|
|
|
- sk->sk_state = SS_UNCONNECTED;
|
|
|
- sock_set_flag(sk, SOCK_DONE);
|
|
|
- sk->sk_state_change(sk);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ if (copied > 0)
|
|
|
err = copied;
|
|
|
- }
|
|
|
|
|
|
out:
|
|
|
release_sock(sk);
|