]> Pileus Git - ~andy/linux/commit
target: Make target_do_xcopy failures return INVALID_PARAMETER_LIST
authorNicholas Bellinger <nab@linux-iscsi.org>
Mon, 7 Oct 2013 22:20:07 +0000 (15:20 -0700)
committerNicholas Bellinger <nab@linux-iscsi.org>
Wed, 9 Oct 2013 08:54:43 +0000 (01:54 -0700)
commit934a138e970e5af73d6f79469a1eb363572abbaa
treebe6beb6fd04652684aa4e1c8ce3a6d7cf16ec1c7
parent9e20ae339721d614a1b0768c48bd73b456ff7905
target: Make target_do_xcopy failures return INVALID_PARAMETER_LIST

This patch changes target_do_xcopy() to properly return
TCM_INVALID_PARAMETER_LIST instead of TCM_INVALID_CDB_FIELD
for failures related to the EXTENDED_COPY parameter list parsing.

Also, move struct xcopy_op allocation ahead of kmapping to
handle the special TCM_OUT_OF_RESOURCES case.

Reported-by: Thomas Glanzmann <thomas@glanzmann.de>
Reported-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_xcopy.c