From: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx> This patch fixes a possible case in transport_generic_new_cmd() where a failure from TFO->write_pending() from a fabric module return something other than -EAGAIN or -ENOMEM would cause a failed WRITE to silently succeed. Go ahead and return TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE for this special case instead of only just making noise with WARN_ON(). Cc: Christoph Hellwig <hch@xxxxxx> Cc: Roland Dreier <roland@xxxxxxxxxxxxxxx> Signed-off-by: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx> --- drivers/target/target_core_transport.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index a3ae756..86ddf43 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -2128,7 +2128,7 @@ transport_generic_new_cmd(struct se_cmd *cmd) /* fabric drivers should only return -EAGAIN or -ENOMEM as error */ WARN_ON(ret); - return 0; + return TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE; queue_full: pr_debug("Handling write_pending QUEUE__FULL: se_cmd: %p\n", cmd); -- 1.7.2.5 -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html