]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - include/net/llc.h
net, x25: convert x25_route.refcnt from atomic_t to refcount_t
[linux.git] / include / net / llc.h
index 68490cbc8a659de87fefbfe1d80f8b29bed85dbc..dc35f25eb679d4651b59a20c785005aa0cbb4d0f 100644 (file)
@@ -55,7 +55,7 @@ struct llc_sap {
        unsigned char    state;
        unsigned char    p_bit;
        unsigned char    f_bit;
-       atomic_t         refcnt;
+       refcount_t               refcnt;
        int              (*rcv_func)(struct sk_buff *skb,
                                     struct net_device *dev,
                                     struct packet_type *pt,
@@ -93,7 +93,6 @@ struct hlist_nulls_head *llc_sk_laddr_hash(struct llc_sap *sap,
 #define LLC_DEST_CONN            2      /* Type 2 goes here */
 
 extern struct list_head llc_sap_list;
-extern spinlock_t llc_sap_list_lock;
 
 int llc_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt,
            struct net_device *orig_dev);
@@ -114,14 +113,14 @@ struct llc_sap *llc_sap_open(unsigned char lsap,
                                        struct net_device *orig_dev));
 static inline void llc_sap_hold(struct llc_sap *sap)
 {
-       atomic_inc(&sap->refcnt);
+       refcount_inc(&sap->refcnt);
 }
 
 void llc_sap_close(struct llc_sap *sap);
 
 static inline void llc_sap_put(struct llc_sap *sap)
 {
-       if (atomic_dec_and_test(&sap->refcnt))
+       if (refcount_dec_and_test(&sap->refcnt))
                llc_sap_close(sap);
 }