target/pscsi: Fix page increment

commit 472b72f2db upstream.

The page++ is wrong. It makes bio_add_pc_page() pointing to a wrong page
address if the 'while (len > 0 && data_len > 0) { ... }' loop is
executed more than one once.

Signed-off-by: Asias He <asias@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Asias He 2013-02-27 13:29:29 +08:00 committed by Greg Kroah-Hartman
parent c60de9344c
commit a5646410c2

View File

@ -1042,7 +1042,6 @@ static int pscsi_map_sg(struct se_task *task, struct scatterlist *task_sg,
bio = NULL;
}
page++;
len -= bytes;
data_len -= bytes;
off = 0;