scst: Avoid truncating requests larger than 512 KB

Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4668 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2012-12-28 03:13:13 +00:00
parent 3d0f5096fb
commit da3337faae

View File

@@ -2817,7 +2817,7 @@ static void scst_adjust_sg(struct scst_cmd *cmd, struct scatterlist *sg,
cmd->orig_sg_cnt = *sg_cnt;
cmd->orig_sg_entry = &sg[j];
cmd->orig_entry_len = sg[j].length;
*sg_cnt = (left > 0) ? j+1 : j;
*sg_cnt = (left > 0) ? i+1 : i;
sg[j].length = left;
cmd->sg_buff_modified = 1;
break;