From: Roland Dreier Date: Tue, 5 Jun 2012 06:24:51 +0000 (-0700) Subject: target: Return error to initiator if SET TARGET PORT GROUPS emulation fails X-Git-Tag: v3.2.21~12 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1686a65dce9c39014e28dc77a9ac9abd1efba48c;p=pandora-kernel.git target: Return error to initiator if SET TARGET PORT GROUPS emulation fails commit 59e4f541baf728dbb426949bfa9f6862387ffd0e upstream. The error paths in target_emulate_set_target_port_groups() are all essentially "rc = -EINVAL; goto out;" but the code at "out:" ignores rc and always returns success. This means that even if eg explicit ALUA is turned off, the initiator will always see a good SCSI status for SET TARGET PORT GROUPS. Fix this by returning rc as is intended. It appears this bug was added by the following patch: commit 05d1c7c0d0db4cc25548d9aadebb416888a82327 Author: Andy Grover Date: Wed Jul 20 19:13:28 2011 +0000 target: Make all control CDBs scatter-gather Signed-off-by: Roland Dreier Cc: Andy Grover Signed-off-by: Nicholas Bellinger [bwh: Backported to 3.2: we have transport_complete_task() and not target_complete_cmd()] Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed