diff options
author | Varun Prakash <varun@chelsio.com> | 2017-07-23 20:03:45 +0530 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2017-07-30 15:32:48 -0700 |
commit | 310d40a973c560a24c79f84cb5f16dc540a05686 (patch) | |
tree | c0532c34b8c0a1261aa8cbeed3a6a3b4c1b71ee6 /drivers/target/iscsi | |
parent | ea8dc5b4cd2195ee582cae28afa4164c6dea1738 (diff) | |
download | op-kernel-dev-310d40a973c560a24c79f84cb5f16dc540a05686.zip op-kernel-dev-310d40a973c560a24c79f84cb5f16dc540a05686.tar.gz |
iscsi-target: fix invalid flags in text response
In case of multiple text responses iscsi-target
sets both 'F' and 'C' bit for the final text response
pdu, this issue happens because hdr->flags is not
zeroed out before ORing with 'F' bit.
This patch removes the | operator to fix this issue.
Signed-off-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/iscsi')
-rw-r--r-- | drivers/target/iscsi/iscsi_target.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c index 2688918..12803de 100644 --- a/drivers/target/iscsi/iscsi_target.c +++ b/drivers/target/iscsi/iscsi_target.c @@ -3488,9 +3488,9 @@ iscsit_build_text_rsp(struct iscsi_cmd *cmd, struct iscsi_conn *conn, return text_length; if (completed) { - hdr->flags |= ISCSI_FLAG_CMD_FINAL; + hdr->flags = ISCSI_FLAG_CMD_FINAL; } else { - hdr->flags |= ISCSI_FLAG_TEXT_CONTINUE; + hdr->flags = ISCSI_FLAG_TEXT_CONTINUE; cmd->read_data_done += text_length; if (cmd->targ_xfer_tag == 0xFFFFFFFF) cmd->targ_xfer_tag = session_get_next_ttt(conn->sess); |