diff options
author | Mike Christie <michaelc@cs.wisc.edu> | 2009-04-21 16:32:31 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-04-27 11:09:51 -0400 |
commit | 9a6510eb3f030cedba32664498a610dc6d084d46 (patch) | |
tree | 694b56e08f2a89000a9e312ce4d6f83a50878263 /drivers/scsi/iscsi_tcp.c | |
parent | 70932935b61ee3dcc5a419ec4c367feb2ff808e4 (diff) |
[SCSI] iscsi_tcp: don't fire conn error if pdu init fails
If a command's scsi cmd pdu setup fails then we can just fail
the IO to the scsi layer. If a DATA_OUT for a R2T fails then
we will want to drop the session, because it means we got a
bad request from the target (iscsi protocol error).
This patch has us propogate the error upwards so libiscsi_tcp
or libiscsi can decide what the best action is to take. It
also fixes a bug where we could try to grab the session lock
while holding it, because if iscsi_tcp drops the session in the
pdu setup callout the session lock is held when setting up the
scsi cmd pdu.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/iscsi_tcp.c')
-rw-r--r-- | drivers/scsi/iscsi_tcp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c index b3e5e08e44ab..f97fc7e9de79 100644 --- a/drivers/scsi/iscsi_tcp.c +++ b/drivers/scsi/iscsi_tcp.c | |||
@@ -463,7 +463,7 @@ static int iscsi_sw_tcp_pdu_init(struct iscsi_task *task, | |||
463 | } | 463 | } |
464 | 464 | ||
465 | if (err) { | 465 | if (err) { |
466 | iscsi_conn_failure(conn, err); | 466 | /* got invalid offset/len */ |
467 | return -EIO; | 467 | return -EIO; |
468 | } | 468 | } |
469 | return 0; | 469 | return 0; |