l2tp: remove l2tp specific refcount debugging
With conversion to refcount_t, such manual debugging code doesn't make
sense anymore.
The tunnel part was already dropped by
54652eb12c
("l2tp: hold tunnel while looking up sessions in l2tp_netlink").
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
a4346210c4
commit
9ff672ba4e
@ -294,37 +294,17 @@ static inline void l2tp_tunnel_dec_refcount(struct l2tp_tunnel *tunnel)
|
|||||||
/* Session reference counts. Incremented when code obtains a reference
|
/* Session reference counts. Incremented when code obtains a reference
|
||||||
* to a session.
|
* to a session.
|
||||||
*/
|
*/
|
||||||
static inline void l2tp_session_inc_refcount_1(struct l2tp_session *session)
|
static inline void l2tp_session_inc_refcount(struct l2tp_session *session)
|
||||||
{
|
{
|
||||||
refcount_inc(&session->ref_count);
|
refcount_inc(&session->ref_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void l2tp_session_dec_refcount_1(struct l2tp_session *session)
|
static inline void l2tp_session_dec_refcount(struct l2tp_session *session)
|
||||||
{
|
{
|
||||||
if (refcount_dec_and_test(&session->ref_count))
|
if (refcount_dec_and_test(&session->ref_count))
|
||||||
l2tp_session_free(session);
|
l2tp_session_free(session);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef L2TP_REFCNT_DEBUG
|
|
||||||
#define l2tp_session_inc_refcount(_s) \
|
|
||||||
do { \
|
|
||||||
pr_debug("l2tp_session_inc_refcount: %s:%d %s: cnt=%d\n", \
|
|
||||||
__func__, __LINE__, (_s)->name, \
|
|
||||||
refcount_read(&_s->ref_count)); \
|
|
||||||
l2tp_session_inc_refcount_1(_s); \
|
|
||||||
} while (0)
|
|
||||||
#define l2tp_session_dec_refcount(_s) \
|
|
||||||
do { \
|
|
||||||
pr_debug("l2tp_session_dec_refcount: %s:%d %s: cnt=%d\n", \
|
|
||||||
__func__, __LINE__, (_s)->name, \
|
|
||||||
refcount_read(&_s->ref_count)); \
|
|
||||||
l2tp_session_dec_refcount_1(_s); \
|
|
||||||
} while (0)
|
|
||||||
#else
|
|
||||||
#define l2tp_session_inc_refcount(s) l2tp_session_inc_refcount_1(s)
|
|
||||||
#define l2tp_session_dec_refcount(s) l2tp_session_dec_refcount_1(s)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define l2tp_printk(ptr, type, func, fmt, ...) \
|
#define l2tp_printk(ptr, type, func, fmt, ...) \
|
||||||
do { \
|
do { \
|
||||||
if (((ptr)->debug) & (type)) \
|
if (((ptr)->debug) & (type)) \
|
||||||
|
Loading…
Reference in New Issue
Block a user