All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 08/17] target/core: Make compare_and_write_callback() accept NULL as third argument
@ 2018-09-17 21:35 Bart Van Assche
  2018-10-06 12:07 ` Christoph Hellwig
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Bart Van Assche @ 2018-09-17 21:35 UTC (permalink / raw)
  To: target-devel

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 08/17] target/core: Make compare_and_write_callback() accept NULL as third argument
  2018-09-17 21:35 [PATCH 08/17] target/core: Make compare_and_write_callback() accept NULL as third argument Bart Van Assche
@ 2018-10-06 12:07 ` Christoph Hellwig
  2018-10-07  1:31 ` Nicholas A. Bellinger
  2018-10-12 17:14 ` Bart Van Assche
  2 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2018-10-06 12:07 UTC (permalink / raw)
  To: target-devel

On Mon, Sep 17, 2018 at 02:35:45PM -0700, Bart Van Assche wrote:
> 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.

I'd be tempted to just merge it into that patch to make that fact more
obvious.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 08/17] target/core: Make compare_and_write_callback() accept NULL as third argument
  2018-09-17 21:35 [PATCH 08/17] target/core: Make compare_and_write_callback() accept NULL as third argument Bart Van Assche
  2018-10-06 12:07 ` Christoph Hellwig
@ 2018-10-07  1:31 ` Nicholas A. Bellinger
  2018-10-12 17:14 ` Bart Van Assche
  2 siblings, 0 replies; 4+ messages in thread
From: Nicholas A. Bellinger @ 2018-10-07  1:31 UTC (permalink / raw)
  To: target-devel

On Mon, 2018-09-17 at 14:35 -0700, Bart Van Assche wrote:
> 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;

Looks fine, but should be folded into patch #9 since it's the one who is
first passing a NULL in *post_ret transport_generic_request_failure().

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 08/17] target/core: Make compare_and_write_callback() accept NULL as third argument
  2018-09-17 21:35 [PATCH 08/17] target/core: Make compare_and_write_callback() accept NULL as third argument Bart Van Assche
  2018-10-06 12:07 ` Christoph Hellwig
  2018-10-07  1:31 ` Nicholas A. Bellinger
@ 2018-10-12 17:14 ` Bart Van Assche
  2 siblings, 0 replies; 4+ messages in thread
From: Bart Van Assche @ 2018-10-12 17:14 UTC (permalink / raw)
  To: target-devel

On Sat, 2018-10-06 at 14:07 +-0200, Christoph Hellwig wrote:
+AD4 On Mon, Sep 17, 2018 at 02:35:45PM -0700, Bart Van Assche wrote:
+AD4 +AD4 This patch does not change any functionality. A later patch in this series,
+AD4 +AD4 namely +ACI-Make ABORT and LUN RESET handling synchronous+ACI, depends on this
+AD4 +AD4 patch.
+AD4 
+AD4 I'd be tempted to just merge it into that patch to make that fact more
+AD4 obvious.

OK, I will do that.

Thanks,

Bart.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-10-12 17:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-17 21:35 [PATCH 08/17] target/core: Make compare_and_write_callback() accept NULL as third argument Bart Van Assche
2018-10-06 12:07 ` Christoph Hellwig
2018-10-07  1:31 ` Nicholas A. Bellinger
2018-10-12 17:14 ` Bart Van Assche

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.