summaryrefslogtreecommitdiffstats
path: root/drivers/target/iscsi/iscsi_target_erl1.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-02-15 16:18:47 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2014-02-15 16:18:47 -0800
commit946dd683afb611721cce2cc7e76a19e74f58e067 (patch)
treef27e415c00548c56c2d6f35013e43b1df5576018 /drivers/target/iscsi/iscsi_target_erl1.c
parent2d0ef4fb34b0462d84a2d87292144b9dad79c8d0 (diff)
parentd6a65fdc8903e632aa7bf86ee0f61a73969371f6 (diff)
downloadlinux-946dd683afb611721cce2cc7e76a19e74f58e067.tar.gz
linux-946dd683afb611721cce2cc7e76a19e74f58e067.tar.bz2
linux-946dd683afb611721cce2cc7e76a19e74f58e067.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
Pull SCSI target fixes from Nicholas Bellinger: "Mostly minor fixes this time to v3.14-rc1 related changes. Also included is one fix for a free after use regression in persistent reservations UNREGISTER logic that is CC'ed to >= v3.11.y stable" * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: Target/sbc: Fix protection copy routine IB/srpt: replace strict_strtoul() with kstrtoul() target: Simplify command completion by removing CMD_T_FAILED flag iser-target: Fix leak on failure in isert_conn_create_fastreg_pool iscsi-target: Fix SNACK Type 1 + BegRun=0 handling target: Fix missing length check in spc_emulate_evpd_83() qla2xxx: Remove last vestiges of qla_tgt_cmd.cmd_list target: Fix 32-bit + CONFIG_LBDAF=n link error w/ sector_div target: Fix free-after-use regression in PR unregister
Diffstat (limited to 'drivers/target/iscsi/iscsi_target_erl1.c')
-rw-r--r--drivers/target/iscsi/iscsi_target_erl1.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/target/iscsi/iscsi_target_erl1.c b/drivers/target/iscsi/iscsi_target_erl1.c
index e048d6439f4a..cda4d80cfaef 100644
--- a/drivers/target/iscsi/iscsi_target_erl1.c
+++ b/drivers/target/iscsi/iscsi_target_erl1.c
@@ -507,7 +507,9 @@ int iscsit_handle_status_snack(
u32 last_statsn;
int found_cmd;
- if (conn->exp_statsn > begrun) {
+ if (!begrun) {
+ begrun = conn->exp_statsn;
+ } else if (conn->exp_statsn > begrun) {
pr_err("Got Status SNACK Begrun: 0x%08x, RunLength:"
" 0x%08x but already got ExpStatSN: 0x%08x on CID:"
" %hu.\n", begrun, runlength, conn->exp_statsn,