summaryrefslogtreecommitdiffstats
path: root/net/core/neighbour.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.osdl.org>2006-12-09 09:38:59 -0800
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-09 09:38:59 -0800
commit99b48cff405333afe26ac603b37639c410a48e5d (patch)
tree31b427930317b1596ca6070585f66a108b722580 /net/core/neighbour.c
parent200d018eff4be3a1fb9823441cfcebb7de86a677 (diff)
parentd3dcc077bf88806201093f86325ec656e4dbfbce (diff)
downloadop-kernel-dev-99b48cff405333afe26ac603b37639c410a48e5d.zip
op-kernel-dev-99b48cff405333afe26ac603b37639c410a48e5d.tar.gz
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: [NETLINK]: Put {IFA,IFLA}_{RTA,PAYLOAD} macros back for userspace. [NET_SCHED] sch_htb: turn intermediate classes into leaves [NET_SCHED] sch_cbq: deactivating when grafting, purging etc. [XFRM]: Fix XFRMGRP_REPORT to use correct multicast group. [NET]: Force a cache line split in hh_cache in SMP. [NETPOLL]: make arp replies through netpoll use mac address of sender [NETLINK]: Restore API compatibility of address and neighbour bits [AX.25]: Fix default address and broadcast address initialization. [AX.25]: Constify ax25 utility functions [BNX2]: Add an error check. [NET]: Convert hh_lock to seqlock.
Diffstat (limited to 'net/core/neighbour.c')
-rw-r--r--net/core/neighbour.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 0ab1987..e7300b6 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -577,9 +577,10 @@ void neigh_destroy(struct neighbour *neigh)
while ((hh = neigh->hh) != NULL) {
neigh->hh = hh->hh_next;
hh->hh_next = NULL;
- write_lock_bh(&hh->hh_lock);
+
+ write_seqlock_bh(&hh->hh_lock);
hh->hh_output = neigh_blackhole;
- write_unlock_bh(&hh->hh_lock);
+ write_sequnlock_bh(&hh->hh_lock);
if (atomic_dec_and_test(&hh->hh_refcnt))
kfree(hh);
}
@@ -897,9 +898,9 @@ static void neigh_update_hhs(struct neighbour *neigh)
if (update) {
for (hh = neigh->hh; hh; hh = hh->hh_next) {
- write_lock_bh(&hh->hh_lock);
+ write_seqlock_bh(&hh->hh_lock);
update(hh, neigh->dev, neigh->ha);
- write_unlock_bh(&hh->hh_lock);
+ write_sequnlock_bh(&hh->hh_lock);
}
}
}
@@ -1089,7 +1090,7 @@ static void neigh_hh_init(struct neighbour *n, struct dst_entry *dst,
break;
if (!hh && (hh = kzalloc(sizeof(*hh), GFP_ATOMIC)) != NULL) {
- rwlock_init(&hh->hh_lock);
+ seqlock_init(&hh->hh_lock);
hh->hh_type = protocol;
atomic_set(&hh->hh_refcnt, 0);
hh->hh_next = NULL;
OpenPOWER on IntegriCloud