Skip to content

Commit aeb5027

Browse files
Mike Christiemartinkpetersen
authored andcommitted
scsi: iscsi target: have iscsit_start_nopin_timer call __iscsit_start_nopin_timer
Just have iscsit_start_nopin_timer grab the lock and call __iscsit_start_nopin_timer. Signed-off-by: Mike Christie <mchristi@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 6a64f6e commit aeb5027

1 file changed

Lines changed: 1 addition & 19 deletions

File tree

‎drivers/target/iscsi/iscsi_target_util.c‎

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,26 +1053,8 @@ void __iscsit_start_nopin_timer(struct iscsi_conn *conn)
10531053

10541054
void iscsit_start_nopin_timer(struct iscsi_conn *conn)
10551055
{
1056-
struct iscsi_session *sess = conn->sess;
1057-
struct iscsi_node_attrib *na = iscsit_tpg_get_node_attrib(sess);
1058-
/*
1059-
* NOPIN timeout is disabled..
1060-
*/
1061-
if (!na->nopin_timeout)
1062-
return;
1063-
10641056
spin_lock_bh(&conn->nopin_timer_lock);
1065-
if (conn->nopin_timer_flags & ISCSI_TF_RUNNING) {
1066-
spin_unlock_bh(&conn->nopin_timer_lock);
1067-
return;
1068-
}
1069-
1070-
conn->nopin_timer_flags &= ~ISCSI_TF_STOP;
1071-
conn->nopin_timer_flags |= ISCSI_TF_RUNNING;
1072-
mod_timer(&conn->nopin_timer, jiffies + na->nopin_timeout * HZ);
1073-
1074-
pr_debug("Started NOPIN Timer on CID: %d at %u second"
1075-
" interval\n", conn->cid, na->nopin_timeout);
1057+
__iscsit_start_nopin_timer(conn);
10761058
spin_unlock_bh(&conn->nopin_timer_lock);
10771059
}
10781060

0 commit comments

Comments
 (0)