scsi: target/iscsi: Convert comments about locking into runtime checks
Cc: Nicholas Bellinger <nab@linux-iscsi.org> Cc: Mike Christie <mchristi@redhat.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Hannes Reinecke <hare@suse.de> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:

committed by
Martin K. Petersen

parent
b53655b80c
commit
618baaf788
@@ -308,9 +308,6 @@ bool iscsit_check_np_match(
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* Called with mutex np_lock held
|
||||
*/
|
||||
static struct iscsi_np *iscsit_get_np(
|
||||
struct sockaddr_storage *sockaddr,
|
||||
int network_transport)
|
||||
@@ -318,6 +315,8 @@ static struct iscsi_np *iscsit_get_np(
|
||||
struct iscsi_np *np;
|
||||
bool match;
|
||||
|
||||
lockdep_assert_held(&np_lock);
|
||||
|
||||
list_for_each_entry(np, &g_np_list, np_list) {
|
||||
spin_lock_bh(&np->np_thread_lock);
|
||||
if (np->np_thread_state != ISCSI_NP_THREAD_ACTIVE) {
|
||||
@@ -2655,9 +2654,6 @@ static int iscsit_handle_immediate_data(
|
||||
return IMMEDIATE_DATA_NORMAL_OPERATION;
|
||||
}
|
||||
|
||||
/*
|
||||
* Called with sess->conn_lock held.
|
||||
*/
|
||||
/* #warning iscsi_build_conn_drop_async_message() only sends out on connections
|
||||
with active network interface */
|
||||
static void iscsit_build_conn_drop_async_message(struct iscsi_conn *conn)
|
||||
@@ -2666,6 +2662,8 @@ static void iscsit_build_conn_drop_async_message(struct iscsi_conn *conn)
|
||||
struct iscsi_conn *conn_p;
|
||||
bool found = false;
|
||||
|
||||
lockdep_assert_held(&conn->sess->conn_lock);
|
||||
|
||||
/*
|
||||
* Only send a Asynchronous Message on connections whos network
|
||||
* interface is still functional.
|
||||
|
Reference in New Issue
Block a user