From: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: linux-scsi@vger.kernel.org, target-devel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [patch] target: update error handling for sbc_setup_write_same()
Date: Tue, 27 Nov 2012 19:03:19 -0800 [thread overview]
Message-ID: <1354071799.18736.110.camel@haakon2.linux-iscsi.org> (raw)
In-Reply-To: <20121127142701.GA1059@elgon.mountain>
Hi Dan,
On Tue, 2012-11-27 at 17:27 +0300, Dan Carpenter wrote:
> We recently changed this to return positive subsystem error codes so the
> error handling needs to be updated.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
A nice catch on this sense_reason_t return breakage that I managed to
introduce within for-3.8 code.
Applied to for-next.
Thank you!
--nab
> diff --git a/drivers/target/target_core_sbc.c b/drivers/target/target_core_sbc.c
> index 943c689..4fd22cd 100644
> --- a/drivers/target/target_core_sbc.c
> +++ b/drivers/target/target_core_sbc.c
> @@ -439,7 +439,7 @@ sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops)
> cmd->t_task_lba = get_unaligned_be64(&cdb[12]);
>
> ret = sbc_setup_write_same(cmd, &cdb[10], ops);
> - if (ret < 0)
> + if (ret)
> return ret;
> break;
> default:
> @@ -512,7 +512,7 @@ sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops)
> cmd->t_task_lba = get_unaligned_be64(&cdb[2]);
>
> ret = sbc_setup_write_same(cmd, &cdb[1], ops);
> - if (ret < 0)
> + if (ret)
> return ret;
> break;
> case WRITE_SAME:
> @@ -530,7 +530,7 @@ sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops)
> * of byte 1 bit 3 UNMAP instead of original reserved field
> */
> ret = sbc_setup_write_same(cmd, &cdb[1], ops);
> - if (ret < 0)
> + if (ret)
> return ret;
> break;
> case VERIFY:
> --
> To unsubscribe from this list: send the line "unsubscribe target-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2012-11-28 3:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-27 14:27 [patch] target: update error handling for sbc_setup_write_same() Dan Carpenter
2012-11-28 3:03 ` Nicholas A. Bellinger [this message]
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=1354071799.18736.110.camel@haakon2.linux-iscsi.org \
--to=nab@linux-iscsi.org \
--cc=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-scsi@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox