target: Fix reading of data length fields for UNMAP commands
authorRoland Dreier <roland@purestorage.com>
Mon, 16 Jul 2012 22:34:23 +0000 (15:34 -0700)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 2 Aug 2012 13:37:49 +0000 (14:37 +0100)
commitb67183922769604a26c7a5ed1560fb71fd805635
treeb313320fb5b53c1d38be9be75b7ab72e2e8c4454
parent8681d6103dc63879b6b679b2bfa9f59121277b41
target: Fix reading of data length fields for UNMAP commands

commit 1a5fa4576ec8a462313c7516b31d7453481ddbe8 upstream.

The UNMAP DATA LENGTH and UNMAP BLOCK DESCRIPTOR DATA LENGTH fields
are in the unmap descriptor (the payload transferred to our data out
buffer), not in the CDB itself.  Read them from the correct place in
target_emulated_unmap.

Signed-off-by: Roland Dreier <roland@purestorage.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
[bwh: Backported to 3.2: adjust filename, context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/target/target_core_cdb.c