From f7c66dea1a5a9761ae9b91222b7d209c12ea8278 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 10 Feb 2015 14:35:35 +0000 Subject: [PATCH] scst_local: Avoid that session deletion triggers a kernel warning (merge r5631 from trunk) git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@6070 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst_local/scst_local.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scst_local/scst_local.c b/scst_local/scst_local.c index badd23a6f..2a362e7be 100644 --- a/scst_local/scst_local.c +++ b/scst_local/scst_local.c @@ -154,6 +154,8 @@ static int __scst_local_add_adapter(struct scst_local_tgt *tgt, const char *initiator_name, bool locked); static int scst_local_add_adapter(struct scst_local_tgt *tgt, const char *initiator_name); +static void scst_local_close_session_impl(struct scst_local_sess *sess, + bool async); static void scst_local_remove_adapter(struct scst_local_sess *sess); static int scst_local_add_target(const char *target_name, struct scst_local_tgt **out_tgt); @@ -780,7 +782,7 @@ static ssize_t scst_local_sysfs_mgmt_cmd(char *buf) res = -EINVAL; goto out_unlock; } - scst_local_remove_adapter(sess); + scst_local_close_session_impl(sess, false); } res = 0;