]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[DECNET]: Convert rwlock to spinlock
authorSteven Whitehouse <steve@chygwyn.com>
Wed, 9 Aug 2006 23:00:57 +0000 (16:00 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Fri, 22 Sep 2006 21:54:15 +0000 (14:54 -0700)
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>
net/decnet/dn_fib.c

index 846df3954a6338c7db572abef5ee4aa9de5b0ab6..ed5fb5c3eab59925427320e70173442c40f5172a 100644 (file)
@@ -59,7 +59,7 @@ extern int dn_cache_dump(struct sk_buff *skb, struct netlink_callback *cb);
 
 static DEFINE_SPINLOCK(dn_fib_multipath_lock);
 static struct dn_fib_info *dn_fib_info_list;
-static DEFINE_RWLOCK(dn_fib_info_lock);
+static DEFINE_SPINLOCK(dn_fib_info_lock);
 
 static struct
 {
@@ -97,7 +97,7 @@ void dn_fib_free_info(struct dn_fib_info *fi)
 
 void dn_fib_release_info(struct dn_fib_info *fi)
 {
-       write_lock(&dn_fib_info_lock);
+       spin_lock(&dn_fib_info_lock);
        if (fi && --fi->fib_treeref == 0) {
                if (fi->fib_next)
                        fi->fib_next->fib_prev = fi->fib_prev;
@@ -108,7 +108,7 @@ void dn_fib_release_info(struct dn_fib_info *fi)
                fi->fib_dead = 1;
                dn_fib_info_put(fi);
        }
-       write_unlock(&dn_fib_info_lock);
+       spin_unlock(&dn_fib_info_lock);
 }
 
 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:
 
        fi->fib_treeref++;
        atomic_inc(&fi->fib_clntref);
-       write_lock(&dn_fib_info_lock);
+       spin_lock(&dn_fib_info_lock);
        fi->fib_next = dn_fib_info_list;
        fi->fib_prev = NULL;
        if (dn_fib_info_list)
                dn_fib_info_list->fib_prev = fi;
        dn_fib_info_list = fi;
-       write_unlock(&dn_fib_info_lock);
+       spin_unlock(&dn_fib_info_lock);
        return fi;
 
 err_inval: