diff options
author | Steven Whitehouse <steve@chygwyn.com> | 2006-08-09 19:00:57 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-09-22 17:54:15 -0400 |
commit | a22ec367b08455f95fa0096ce1999950b6f6911c (patch) | |
tree | ca6a3be19df20cf63b513d8540e9dc84b5e33bc4 | |
parent | a8731cbf61c8768ea129780b70dc7dfc6795aad4 (diff) |
[DECNET]: Convert rwlock to spinlock
As per Stephen Hemminger's recent patch to ipv4/fib_semantics.c this
is the same change but for DECnet.
Signed-off-by: Steven Whitehouse <steve@chygwyn.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/decnet/dn_fib.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/decnet/dn_fib.c b/net/decnet/dn_fib.c index 846df3954a63..ed5fb5c3eab5 100644 --- a/net/decnet/dn_fib.c +++ b/net/decnet/dn_fib.c | |||
@@ -59,7 +59,7 @@ extern int dn_cache_dump(struct sk_buff *skb, struct netlink_callback *cb); | |||
59 | 59 | ||
60 | static DEFINE_SPINLOCK(dn_fib_multipath_lock); | 60 | static DEFINE_SPINLOCK(dn_fib_multipath_lock); |
61 | static struct dn_fib_info *dn_fib_info_list; | 61 | static struct dn_fib_info *dn_fib_info_list; |
62 | static DEFINE_RWLOCK(dn_fib_info_lock); | 62 | static DEFINE_SPINLOCK(dn_fib_info_lock); |
63 | 63 | ||
64 | static struct | 64 | static struct |
65 | { | 65 | { |
@@ -97,7 +97,7 @@ void dn_fib_free_info(struct dn_fib_info *fi) | |||
97 | 97 | ||
98 | void dn_fib_release_info(struct dn_fib_info *fi) | 98 | void dn_fib_release_info(struct dn_fib_info *fi) |
99 | { | 99 | { |
100 | write_lock(&dn_fib_info_lock); | 100 | spin_lock(&dn_fib_info_lock); |
101 | if (fi && --fi->fib_treeref == 0) { | 101 | if (fi && --fi->fib_treeref == 0) { |
102 | if (fi->fib_next) | 102 | if (fi->fib_next) |
103 | fi->fib_next->fib_prev = fi->fib_prev; | 103 | fi->fib_next->fib_prev = fi->fib_prev; |
@@ -108,7 +108,7 @@ void dn_fib_release_info(struct dn_fib_info *fi) | |||
108 | fi->fib_dead = 1; | 108 | fi->fib_dead = 1; |
109 | dn_fib_info_put(fi); | 109 | dn_fib_info_put(fi); |
110 | } | 110 | } |
111 | write_unlock(&dn_fib_info_lock); | 111 | spin_unlock(&dn_fib_info_lock); |
112 | } | 112 | } |
113 | 113 | ||
114 | static inline int dn_fib_nh_comp(const struct dn_fib_info *fi, const struct dn_fib_info *ofi) | 114 | static inline int dn_fib_nh_comp(const struct dn_fib_info *fi, const struct dn_fib_info *ofi) |
@@ -379,13 +379,13 @@ link_it: | |||
379 | 379 | ||
380 | fi->fib_treeref++; | 380 | fi->fib_treeref++; |
381 | atomic_inc(&fi->fib_clntref); | 381 | atomic_inc(&fi->fib_clntref); |
382 | write_lock(&dn_fib_info_lock); | 382 | spin_lock(&dn_fib_info_lock); |
383 | fi->fib_next = dn_fib_info_list; | 383 | fi->fib_next = dn_fib_info_list; |
384 | fi->fib_prev = NULL; | 384 | fi->fib_prev = NULL; |
385 | if (dn_fib_info_list) | 385 | if (dn_fib_info_list) |
386 | dn_fib_info_list->fib_prev = fi; | 386 | dn_fib_info_list->fib_prev = fi; |
387 | dn_fib_info_list = fi; | 387 | dn_fib_info_list = fi; |
388 | write_unlock(&dn_fib_info_lock); | 388 | spin_unlock(&dn_fib_info_lock); |
389 | return fi; | 389 | return fi; |
390 | 390 | ||
391 | err_inval: | 391 | err_inval: |