]> 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 e8e61d4fb45838e82c5469a0b060f4c1fd3e9adb..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,
@@ -113,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);
 }