aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/datagram.c
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2017-03-24 10:08:12 -0700
committerDavid S. Miller <davem@davemloft.net>2017-03-24 20:49:30 -0700
commit2b5cd0dfa384242f78a396b90087368c9440cc9a (patch)
treeaba02503d7405e225fe590248127028e10cafd8c /net/core/datagram.c
parentnet: Only define skb_mark_napi_id in one spot instead of two (diff)
downloadlinux-dev-2b5cd0dfa384242f78a396b90087368c9440cc9a.tar.xz
linux-dev-2b5cd0dfa384242f78a396b90087368c9440cc9a.zip
net: Change return type of sk_busy_loop from bool to void
checking the return value of sk_busy_loop. As there are only a few consumers of that data, and the data being checked for can be replaced with a check for !skb_queue_empty() we might as well just pull the code out of sk_busy_loop and place it in the spots that actually need it. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/datagram.c')
-rw-r--r--net/core/datagram.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/net/core/datagram.c b/net/core/datagram.c
index ea633342ab0d..4608aa245410 100644
--- a/net/core/datagram.c
+++ b/net/core/datagram.c
@@ -256,8 +256,12 @@ struct sk_buff *__skb_try_recv_datagram(struct sock *sk, unsigned int flags,
}
spin_unlock_irqrestore(&queue->lock, cpu_flags);
- } while (sk_can_busy_loop(sk) &&
- sk_busy_loop(sk, flags & MSG_DONTWAIT));
+
+ if (!sk_can_busy_loop(sk))
+ break;
+
+ sk_busy_loop(sk, flags & MSG_DONTWAIT);
+ } while (!skb_queue_empty(&sk->sk_receive_queue));
error = -EAGAIN;