Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 224352
b: refs/heads/master
c: c31504d
h: refs/heads/master
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Nov 16, 2010
1 parent 2d7464d commit 91e8b70
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 213b15ca818adf7766cd7162c2159a6ecdd3bab8
refs/heads/master: c31504dc0d1dc853dcee509d9999169a9097a717
2 changes: 1 addition & 1 deletion trunk/include/net/sock.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
#include <linux/rculist_nulls.h>
#include <linux/poll.h>

#include <asm/atomic.h>
#include <linux/atomic.h>
#include <net/dst.h>
#include <net/checksum.h>

Expand Down
4 changes: 2 additions & 2 deletions trunk/net/ipv4/udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ static struct sock *udp4_lib_lookup2(struct net *net,

if (result) {
exact_match:
if (unlikely(!atomic_inc_not_zero(&result->sk_refcnt)))
if (unlikely(!atomic_inc_not_zero_hint(&result->sk_refcnt, 2)))
result = NULL;
else if (unlikely(compute_score2(result, net, saddr, sport,
daddr, hnum, dif) < badness)) {
Expand Down Expand Up @@ -500,7 +500,7 @@ static struct sock *__udp4_lib_lookup(struct net *net, __be32 saddr,
goto begin;

if (result) {
if (unlikely(!atomic_inc_not_zero(&result->sk_refcnt)))
if (unlikely(!atomic_inc_not_zero_hint(&result->sk_refcnt, 2)))
result = NULL;
else if (unlikely(compute_score(result, net, saddr, hnum, sport,
daddr, dport, dif) < badness)) {
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/ipv6/udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ static struct sock *udp6_lib_lookup2(struct net *net,

if (result) {
exact_match:
if (unlikely(!atomic_inc_not_zero(&result->sk_refcnt)))
if (unlikely(!atomic_inc_not_zero_hint(&result->sk_refcnt, 2)))
result = NULL;
else if (unlikely(compute_score2(result, net, saddr, sport,
daddr, hnum, dif) < badness)) {
Expand Down Expand Up @@ -294,7 +294,7 @@ static struct sock *__udp6_lib_lookup(struct net *net,
goto begin;

if (result) {
if (unlikely(!atomic_inc_not_zero(&result->sk_refcnt)))
if (unlikely(!atomic_inc_not_zero_hint(&result->sk_refcnt, 2)))
result = NULL;
else if (unlikely(compute_score(result, net, hnum, saddr, sport,
daddr, dport, dif) < badness)) {
Expand Down

0 comments on commit 91e8b70

Please sign in to comment.