From c1d411eb4f7d1e5ec686273392eabf87d0caf06f Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Mon, 27 Aug 2012 22:07:10 +0000 Subject: [PATCH] Fix a recently introduced race condition Make scst_unregister_target() wait again until the session unregistration callbacks have finished instead of waiting only until all sessions have been unregistered. Signed-off-by: Bart Van Assche git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4491 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scst/src/scst_main.c b/scst/src/scst_main.c index a3179ac26..6c68b2942 100644 --- a/scst/src/scst_main.c +++ b/scst/src/scst_main.c @@ -598,7 +598,7 @@ static inline int test_sess_list(struct scst_tgt *tgt) { int res; mutex_lock(&scst_mutex); - res = list_empty(&tgt->sess_list); + res = list_empty(&tgt->sysfs_sess_list); mutex_unlock(&scst_mutex); return res; }