On Tuesday, September 09/06/16, 2016 at 12:56:57 +0800, Zhu Lingshan wrote: > Yes, I believe so, sorry for that, please see my original patch thread, it > has the right locks. I also corrected the locks in this thread Ok. I am working on similar issue, so was keen about this change. Thanks for the patch, Bharat. > > Thanks, > BR > Zhu Lingshan > > On 09/06/2016 12:45 PM, Potnuri Bharat Teja wrote: > >On Wednesday, August 08/31/16, 2016 at 21:09:35 +0530, Lee Duncan wrote: > >>On 08/31/2016 02:49 AM, Zhu Lingshan wrote: > >>>This fixed an issue where IO stress testing on > >>>top of OCFS2 over an iSCSI target. Missed a > >>>complet operation caused the target hung, > >>>requiring a reboot. Also moved the complete > >>>operation out of the conditionals. > >>> > >>>Signed-off-by: Zhu Lingshan <lszhu@xxxxxxxx> > >>>--- > >>> drivers/target/iscsi/iscsi_target.c | 13 +++++-------- > >>> 1 file changed, 5 insertions(+), 8 deletions(-) > >>> > >>>diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c > >>>index 50f3d3a..4fdde4e 100644 > >>>--- a/drivers/target/iscsi/iscsi_target.c > >>>+++ b/drivers/target/iscsi/iscsi_target.c > >>>@@ -4279,16 +4279,12 @@ int iscsit_close_connection( > >>> spin_unlock_bh(&sess->conn_lock); > >>> iscsit_close_session(sess); > >>>- return 0; > >>> } else if (atomic_read(&sess->session_logout)) { > >>> pr_debug("Moving to TARG_SESS_STATE_FREE.\n"); > >>> sess->session_state = TARG_SESS_STATE_FREE; > >>> spin_unlock_bh(&sess->conn_lock); > >The above lock must be a typo. > >>>- if (atomic_read(&sess->sleep_on_sess_wait_comp)) > >>>- complete(&sess->session_wait_comp); > >>>- return 0; > >>> } else { > >>> pr_debug("Moving to TARG_SESS_STATE_FAILED.\n"); > >>> sess->session_state = TARG_SESS_STATE_FAILED; > >>>@@ -4299,11 +4295,12 @@ int iscsit_close_connection( > >>> } else > >>> spin_unlock_bh(&sess->conn_lock); > >>>- if (atomic_read(&sess->sleep_on_sess_wait_comp)) > >>>- complete(&sess->session_wait_comp); > >>>- > >>>- return 0; > >>> } > >>>+ if (atomic_read(&sess->sleep_on_sess_wait_comp)) > >>>+ complete(&sess->session_wait_comp); > >>>+ > >>>+ return 0; > >>>+ > >>> } > >>> /* > >>> > >>Reviewed-by: Lee Duncan <lduncan@xxxxxxxx> > >> > >>-- > >>Lee > >>-- > >>To unsubscribe from this list: send the line "unsubscribe target-devel" in > >>the body of a message to majordomo@xxxxxxxxxxxxxxx > >>More majordomo info at http://vger.kernel.org/majordomo-info.html > > -- > To unsubscribe from this list: send the line "unsubscribe target-devel" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html