ibmvscsis: Fix srp_transfer_data fail return code

If srp_transfer_data fails within ibmvscsis_write_pending, then
the most likely scenario is that the client timed out the op and
removed the TCE mapping. Thus it will loop forever retrying the
op that is pretty much guaranteed to fail forever. A better return
code would be EIO instead of EAGAIN.

Cc: stable@vger.kernel.org
Reported-by: Steven Royer <seroyer@linux.vnet.ibm.com>
Tested-by: Steven Royer <seroyer@linux.vnet.ibm.com>
Signed-off-by: Bryant G. Ly <bgly@us.ibm.com>
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
This commit is contained in:
Bryant G. Ly 2017-01-09 10:21:20 -06:00 committed by Bart Van Assche
parent 87156518da
commit 7c9d8d0c41
1 changed files with 1 additions and 1 deletions

View File

@ -3585,7 +3585,7 @@ static int ibmvscsis_write_pending(struct se_cmd *se_cmd)
1, 1);
if (rc) {
pr_err("srp_transfer_data() failed: %d\n", rc);
return -EAGAIN;
return -EIO;
}
/*
* We now tell TCM to add this WRITE CDB directly into the TCM storage