提交 8642bd9e 编写于 作者: A Allan Stephens 提交者: David S. Miller

tipc: Optimize pointer dereferencing when receiving stream data

This patch eliminates an unnecessary pointer dereference when
accessing a stream-based socket's receive queue.
Signed-off-by: NAllan Stephens <allan.stephens@windriver.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 0ea52241
...@@ -1133,7 +1133,7 @@ static int recv_stream(struct kiocb *iocb, struct socket *sock, ...@@ -1133,7 +1133,7 @@ static int recv_stream(struct kiocb *iocb, struct socket *sock,
/* Loop around if more data is required */ /* Loop around if more data is required */
if ((sz_copied < buf_len) /* didn't get all requested data */ if ((sz_copied < buf_len) /* didn't get all requested data */
&& (!skb_queue_empty(&sock->sk->sk_receive_queue) || && (!skb_queue_empty(&sk->sk_receive_queue) ||
(flags & MSG_WAITALL)) (flags & MSG_WAITALL))
/* ... and more is ready or required */ /* ... and more is ready or required */
&& (!(flags & MSG_PEEK)) /* ... and aren't just peeking at data */ && (!(flags & MSG_PEEK)) /* ... and aren't just peeking at data */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册