瀏覽代碼

Bluetooth: debug: Print l2cap_chan refcount

Improve debug output.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Andrei Emeltchenko 13 年之前
父節點
當前提交
4b10b274e2
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      include/net/bluetooth/l2cap.h

+ 4 - 0
include/net/bluetooth/l2cap.h

@@ -672,11 +672,15 @@ enum {
 
 
 static inline void l2cap_chan_hold(struct l2cap_chan *c)
 static inline void l2cap_chan_hold(struct l2cap_chan *c)
 {
 {
+	BT_DBG("chan %p orig refcnt %d", c, atomic_read(&c->refcnt));
+
 	atomic_inc(&c->refcnt);
 	atomic_inc(&c->refcnt);
 }
 }
 
 
 static inline void l2cap_chan_put(struct l2cap_chan *c)
 static inline void l2cap_chan_put(struct l2cap_chan *c)
 {
 {
+	BT_DBG("chan %p orig refcnt %d", c, atomic_read(&c->refcnt));
+
 	if (atomic_dec_and_test(&c->refcnt))
 	if (atomic_dec_and_test(&c->refcnt))
 		kfree(c);
 		kfree(c);
 }
 }