mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-31 14:23:49 +01:00
TCM doesn't properly handle underflow case for service actions. One way to prevent it is to always complete command with target_complete_cmd_with_length(), however it requires access to data_sg, which is not always available. This change introduces target_set_cmd_data_length() function which allows to set command data length before completing it. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Roman Bolshakov <[email protected]> Reviewed-by: Bodo Stroesser <[email protected]> Signed-off-by: Aleksandr Miloserdov <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>