Commit e00c5d8b authored by Andrew Morton's avatar Andrew Morton Committed by Dan Williams

I/OAT: warning fix

net/ipv4/tcp.c: In function 'tcp_recvmsg':
net/ipv4/tcp.c:1111: warning: unused variable 'available'
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarChris Leech <christopher.leech@intel.com>
parent 2b1244a4
...@@ -1116,7 +1116,6 @@ int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, ...@@ -1116,7 +1116,6 @@ int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
long timeo; long timeo;
struct task_struct *user_recv = NULL; struct task_struct *user_recv = NULL;
int copied_early = 0; int copied_early = 0;
int available = 0;
struct sk_buff *skb; struct sk_buff *skb;
lock_sock(sk); lock_sock(sk);
...@@ -1145,15 +1144,22 @@ int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, ...@@ -1145,15 +1144,22 @@ int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
tp->ucopy.dma_chan = NULL; tp->ucopy.dma_chan = NULL;
preempt_disable(); preempt_disable();
skb = skb_peek_tail(&sk->sk_receive_queue); skb = skb_peek_tail(&sk->sk_receive_queue);
if (skb) {
available = TCP_SKB_CB(skb)->seq + skb->len - (*seq); int available = 0;
if ((available < target) &&
(len > sysctl_tcp_dma_copybreak) && !(flags & MSG_PEEK) && if (skb)
!sysctl_tcp_low_latency && __get_cpu_var(softnet_data).net_dma) { available = TCP_SKB_CB(skb)->seq + skb->len - (*seq);
preempt_enable_no_resched(); if ((available < target) &&
tp->ucopy.pinned_list = dma_pin_iovec_pages(msg->msg_iov, len); (len > sysctl_tcp_dma_copybreak) && !(flags & MSG_PEEK) &&
} else !sysctl_tcp_low_latency &&
preempt_enable_no_resched(); __get_cpu_var(softnet_data).net_dma) {
preempt_enable_no_resched();
tp->ucopy.pinned_list =
dma_pin_iovec_pages(msg->msg_iov, len);
} else {
preempt_enable_no_resched();
}
}
#endif #endif
do { do {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment