Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1728619
| From | Michael Witten <mfwitten@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 2/3] net: inet_recvmsg(): Remove unnecessary bitwise operation |
| Date | 2017-09-08 08:10 +0200 |
| Message-ID | <unkEi-2Qx-29@gated-at.bofh.it> (permalink) |
| References | <unkuB-2yh-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Date: Fri, 8 Sep 2017 00:47:49 +0000 The flag `MSG_DONTWAIT' is handled by passing an argument through the dedicated parameter `nonblock' of the function `tcp_recvmsg()'. Presumably because `MSG_DONTWAIT' is handled so explicitly, it is unset in the collection of flags that are passed to `tcp_recvmsg()'; yet, this unsetting appears to be unnecessary, and so this commit removes the bitwise operation that performs the unsetting. Signed-off-by: Michael Witten <mfwitten@gmail.com> --- net/ipv4/af_inet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index e31108e5ef79..2dbed042a412 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c @@ -791,7 +791,7 @@ int inet_recvmsg(struct socket *sock, struct msghdr *msg, size_t size, sock_rps_record_flow(sk); err = sk->sk_prot->recvmsg(sk, msg, size, flags & MSG_DONTWAIT, - flags & ~MSG_DONTWAIT, &addr_len); + flags, &addr_len); if (err >= 0) msg->msg_namelen = addr_len; return err; -- 2.14.1
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 0/3] net: TCP/IP: A few minor cleanups Michael Witten <mfwitten@gmail.com> - 2017-09-08 08:00 +0200
[PATCH 1/3] net: __sock_cmsg_send(): Remove unused parameter `msg' Michael Witten <mfwitten@gmail.com> - 2017-09-08 08:10 +0200
[PATCH 3/3] net: skb_queue_purge(): lock/unlock the list only once Michael Witten <mfwitten@gmail.com> - 2017-09-08 08:10 +0200
Re: [PATCH 3/3] net: skb_queue_purge(): lock/unlock the list only once Eric Dumazet <eric.dumazet@gmail.com> - 2017-09-08 18:10 +0200
Re: [PATCH 3/3] net: skb_queue_purge(): lock/unlock the list only once Stephen Hemminger <stephen@networkplumber.org> - 2017-09-08 19:00 +0200
[PATCH v1 3/3] net: skb_queue_purge(): lock/unlock the queue only once Michael Witten <mfwitten@gmail.com> - 2017-09-09 08:30 +0200
Re: [PATCH v1 3/3] net: skb_queue_purge(): lock/unlock the queue only once Eric Dumazet <eric.dumazet@gmail.com> - 2017-09-09 19:00 +0200
[PATCH 2/3] net: inet_recvmsg(): Remove unnecessary bitwise operation Michael Witten <mfwitten@gmail.com> - 2017-09-08 08:10 +0200
csiph-web