diff options
author | Bart Van Assche <bart.vanassche@sandisk.com> | 2017-05-24 02:48:50 +0300 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2017-11-01 21:44:49 +0300 |
commit | 8a47aa9dc636db851254615ea79ba91a52cf9206 (patch) | |
tree | c757f3585118dc416048c693dd7b8a9c7e7d0494 /drivers/target/iscsi/iscsi_target.c | |
parent | d744644ad7088ec04c0e1ad7c6c1adcec849c51c (diff) | |
download | linux-8a47aa9dc636db851254615ea79ba91a52cf9206.tar.xz |
target/iscsi: Simplify timer manipulation code
Move timer initialization from before add_timer() to the context
where the containing object is initialized. Use setup_timer() and
mod_timer() instead of open coding these. Use 'jiffies' instead
of get_jiffies_64() when calculating expiry times because expiry
times have type unsigned long, just like 'jiffies'.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Andy Grover <agrover@redhat.com>
Cc: David Disseldorp <ddiss@suse.de>
Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'drivers/target/iscsi/iscsi_target.c')
-rw-r--r-- | drivers/target/iscsi/iscsi_target.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c index 5001261f5d69..7d619160b3d3 100644 --- a/drivers/target/iscsi/iscsi_target.c +++ b/drivers/target/iscsi/iscsi_target.c @@ -372,6 +372,9 @@ struct iscsi_np *iscsit_add_np( init_completion(&np->np_restart_comp); INIT_LIST_HEAD(&np->np_list); + setup_timer(&np->np_login_timer, iscsi_handle_login_thread_timeout, + (unsigned long)np); + ret = iscsi_target_setup_login_socket(np, sockaddr); if (ret != 0) { kfree(np); |