From a578373d4ecf7356b9231d633e8697bbce51e78d Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 13 Aug 2013 18:32:41 +0000 Subject: [PATCH] fcst: Add more debugging code in ft_sess_put() git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4950 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- fcst/ft_sess.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fcst/ft_sess.c b/fcst/ft_sess.c index 30e10a773..5151343bd 100644 --- a/fcst/ft_sess.c +++ b/fcst/ft_sess.c @@ -490,9 +490,8 @@ static void ft_sess_free(struct kref *kref) static void ft_sess_put(struct ft_sess *sess) { - int sess_held = atomic_read(&sess->kref.refcount); - - BUG_ON(!sess_held); + BUG_ON(!sess); + BUG_ON(atomic_read(&sess->kref.refcount) <= 0); kref_put(&sess->kref, ft_sess_free); }