From 54fe8832057c7430a6a41c44b55cbe95aa55d976 Mon Sep 17 00:00:00 2001 From: Mike Christie Date: Thu, 5 Mar 2009 14:46:07 -0600 Subject: [PATCH] --- yaml --- r: 136321 b: refs/heads/master c: 728996829b3e2a3bbacb7390e6c040dd839cdf21 h: refs/heads/master i: 136319: 88eccf2938b7ea502d7ebe109bc6442bab3c9713 v: v3 --- [refs] | 2 +- trunk/drivers/scsi/libiscsi.c | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 2c7cad35181e..be6fa7178c47 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5e7facb77ff4b6961d936773fb1f175f7abf76b7 +refs/heads/master: 728996829b3e2a3bbacb7390e6c040dd839cdf21 diff --git a/trunk/drivers/scsi/libiscsi.c b/trunk/drivers/scsi/libiscsi.c index d07017911139..dfaa8adf099e 100644 --- a/trunk/drivers/scsi/libiscsi.c +++ b/trunk/drivers/scsi/libiscsi.c @@ -1603,8 +1603,11 @@ static void fail_all_commands(struct iscsi_conn *conn, unsigned lun, { struct iscsi_task *task, *tmp; - if (conn->task && (conn->task->sc->device->lun == lun || lun == -1)) - conn->task = NULL; + if (conn->task) { + if (lun == -1 || + (conn->task->sc && conn->task->sc->device->lun == lun)) + conn->task = NULL; + } /* flush pending */ list_for_each_entry_safe(task, tmp, &conn->xmitqueue, running) {