From: Li RongQing Date: Mon, 8 Dec 2014 01:42:55 +0000 (+0800) Subject: net: avoid to call skb_queue_len again X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=e008f3f07ffba2be471ffd79bd1922af0042f936;p=sagit-ice-cold%2Fkernel_xiaomi_msm8998.git net: avoid to call skb_queue_len again the queue length of sd->input_pkt_queue has been put into qlen, and impossible to change, since hold the lock Signed-off-by: Li RongQing Acked-by: Eric Dumazet Cc: Sergei Shtylyov Signed-off-by: David S. Miller --- diff --git a/net/core/dev.c b/net/core/dev.c index dd3bf582e6f0..3f191da383f6 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -3297,7 +3297,7 @@ static int enqueue_to_backlog(struct sk_buff *skb, int cpu, rps_lock(sd); qlen = skb_queue_len(&sd->input_pkt_queue); if (qlen <= netdev_max_backlog && !skb_flow_limit(skb, qlen)) { - if (skb_queue_len(&sd->input_pkt_queue)) { + if (qlen) { enqueue: __skb_queue_tail(&sd->input_pkt_queue, skb); input_queue_tail_incr_save(sd, qtail);