summaryrefslogtreecommitdiff
path: root/drivers/target/iscsi/iscsi_target_erl1.c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-10-23 00:58:45 +0300
committerKees Cook <keescook@chromium.org>2017-11-01 21:44:50 +0300
commitf7c9564a7cfa3ff69be74bcb1867c898772748b6 (patch)
tree0a78ebea3f176e5a0c2e7548545352c849772edd /drivers/target/iscsi/iscsi_target_erl1.c
parent8a47aa9dc636db851254615ea79ba91a52cf9206 (diff)
downloadlinux-f7c9564a7cfa3ff69be74bcb1867c898772748b6.tar.xz
target/iscsi: Convert timers to use timer_setup()
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Includes a fix for correcting an on-stack timer usage. Cc: "Nicholas A. Bellinger" <nab@linux-iscsi.org> Cc: Bart Van Assche <bart.vanassche@sandisk.com> Cc: Jiang Yi <jiangyilism@gmail.com> Cc: Varun Prakash <varun@chelsio.com> Cc: linux-scsi@vger.kernel.org Cc: target-devel@vger.kernel.org Reviewed-and-Tested-by: Bart Van Assche <Bart.VanAssche@wdc.com> Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'drivers/target/iscsi/iscsi_target_erl1.c')
-rw-r--r--drivers/target/iscsi/iscsi_target_erl1.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/target/iscsi/iscsi_target_erl1.c b/drivers/target/iscsi/iscsi_target_erl1.c
index 19b28255b687..76184094a0cf 100644
--- a/drivers/target/iscsi/iscsi_target_erl1.c
+++ b/drivers/target/iscsi/iscsi_target_erl1.c
@@ -1148,11 +1148,11 @@ static int iscsit_set_dataout_timeout_values(
/*
* NOTE: Called from interrupt (timer) context.
*/
-void iscsit_handle_dataout_timeout(unsigned long data)
+void iscsit_handle_dataout_timeout(struct timer_list *t)
{
u32 pdu_length = 0, pdu_offset = 0;
u32 r2t_length = 0, r2t_offset = 0;
- struct iscsi_cmd *cmd = (struct iscsi_cmd *) data;
+ struct iscsi_cmd *cmd = from_timer(cmd, t, dataout_timer);
struct iscsi_conn *conn = cmd->conn;
struct iscsi_session *sess = NULL;
struct iscsi_node_attrib *na;