From: Allan Stephens Date: Tue, 15 Jul 2008 05:42:51 +0000 (-0700) Subject: tipc: Optimize pointer dereferencing when receiving stream data X-Git-Tag: v2.6.27-rc1~969^2~138 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8642bd9e04f51980b2b6293c66acf7e388c9a6e7;p=linux-2.6 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: Allan Stephens Signed-off-by: David S. Miller --- diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 9c362c5759..ddcb2a753a 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c @@ -1133,7 +1133,7 @@ restart: /* Loop around if more data is required */ 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)) /* ... and more is ready or required */ && (!(flags & MSG_PEEK)) /* ... and aren't just peeking at data */