All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: target-devel@vger.kernel.org
Subject: [PATCH 08/17] target/core: Make compare_and_write_callback() accept NULL as third argument
Date: Mon, 17 Sep 2018 21:35:45 +0000	[thread overview]
Message-ID: <20180917213554.987-9-bvanassche@acm.org> (raw)

This patch does not change any functionality. A later patch in this series,
namely "Make ABORT and LUN RESET handling synchronous", depends on this
patch.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Cc: Nicholas Bellinger <nab@linux-iscsi.org>
Cc: Mike Christie <mchristi@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Hannes Reinecke <hare@suse.de>
---
 drivers/target/target_core_sbc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/target/target_core_sbc.c b/drivers/target/target_core_sbc.c
index 689ba6da9a0f..4719e6a98430 100644
--- a/drivers/target/target_core_sbc.c
+++ b/drivers/target/target_core_sbc.c
@@ -482,7 +482,8 @@ static sense_reason_t compare_and_write_callback(struct se_cmd *cmd, bool succes
 	if (cmd->scsi_status) {
 		pr_debug("compare_and_write_callback: non zero scsi_status:"
 			" 0x%02x\n", cmd->scsi_status);
-		*post_ret = 1;
+		if (post_ret)
+			*post_ret = 1;
 		if (cmd->scsi_status = SAM_STAT_CHECK_CONDITION)
 			ret = TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE;
 		goto out;
-- 
2.18.0

             reply	other threads:[~2018-09-17 21:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-17 21:35 Bart Van Assche [this message]
2018-10-06 12:07 ` [PATCH 08/17] target/core: Make compare_and_write_callback() accept NULL as third argument Christoph Hellwig
2018-10-07  1:31 ` Nicholas A. Bellinger
2018-10-12 17:14 ` Bart Van Assche

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180917213554.987-9-bvanassche@acm.org \
    --to=bvanassche@acm.org \
    --cc=target-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.