mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-18 03:01:26 +00:00
Merge the trunk's r3546:
Set data_out_in_data_receiving for preliminary completed commands as well to prevent releasing them too early in iscsi_check_tm_data_wait_timeouts() git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.1.0.x@3548 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -255,7 +255,8 @@ void iscsi_fail_data_waiting_cmnd(struct iscsi_cmnd *cmnd)
|
||||
{
|
||||
TRACE_ENTRY();
|
||||
|
||||
TRACE_MGMT_DBG("Failing data waiting cmnd %p", cmnd);
|
||||
TRACE_MGMT_DBG("Failing data waiting cmnd %p (data_out_in_data_receiving %d)",
|
||||
cmnd, cmnd->data_out_in_data_receiving);
|
||||
|
||||
/*
|
||||
* There is no race with conn_abort(), since all functions
|
||||
@@ -2102,18 +2103,16 @@ go:
|
||||
if (req_hdr->flags & ISCSI_FLG_FINAL)
|
||||
orig_req->outstanding_r2t--;
|
||||
|
||||
if (unlikely(orig_req->prelim_compl_flags != 0)) {
|
||||
res = iscsi_preliminary_complete(cmnd, orig_req, true);
|
||||
goto out;
|
||||
}
|
||||
|
||||
EXTRACHECKS_BUG_ON(orig_req->data_out_in_data_receiving);
|
||||
orig_req->data_out_in_data_receiving = 1;
|
||||
|
||||
TRACE_WRITE("cmnd %p, orig_req %p, offset %u, datasize %u", cmnd,
|
||||
orig_req, offset, cmnd->pdu.datasize);
|
||||
|
||||
res = cmnd_prepare_recv_pdu(conn, orig_req, offset, cmnd->pdu.datasize);
|
||||
if (unlikely(orig_req->prelim_compl_flags != 0))
|
||||
res = iscsi_preliminary_complete(cmnd, orig_req, true);
|
||||
else
|
||||
res = cmnd_prepare_recv_pdu(conn, orig_req, offset, cmnd->pdu.datasize);
|
||||
|
||||
out:
|
||||
TRACE_EXIT_RES(res);
|
||||
|
||||
Reference in New Issue
Block a user