From: Li RongQing Date: Mon, 8 Dec 2014 01:42:55 +0000 (+0800) Subject: net: avoid to call skb_queue_len again X-Git-Tag: v5.15~16721^2~31 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e008f3f07ffba2be471ffd79bd1922af0042f936;p=platform%2Fkernel%2Flinux-starfive.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 dd3bf58..3f191da 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);