From: Bart V. A. <bva...@ac...> - 2011-11-28 17:52:16
|
iscsi_alloc_data_buf() returns the value 1. That is the numerical representation of SCST_CMD_STATE_PREPARE_SPACE. This causes the SCST core to keep invoking iscsi_alloc_data_buf() in an infinite loop. Change the return value into SCST_CMD_STATE_DEFAULT such that the iSCSI-SCST driver works again without the zero-copy kernel patch. Signed-off-by: Bart Van Assche <bva...@ac...> diff --git a/iscsi-scst/kernel/iscsi.c b/iscsi-scst/kernel/iscsi.c index 6b6e09e..9e5dd04 100644 --- a/iscsi-scst/kernel/iscsi.c +++ b/iscsi-scst/kernel/iscsi.c @@ -3154,7 +3154,7 @@ static int iscsi_alloc_data_buf(struct scst_cmd *cmd) */ EXTRACHECKS_BUG_ON(!(scst_cmd_get_data_direction(cmd) & SCST_DATA_READ)); scst_cmd_set_no_sgv(cmd); - return 1; + return SCST_CMD_STATE_DEFAULT; } #endif |