LASSERT (tx->tx_conn == NULL); /* only set when assigned a conn */
LASSERT (tx->tx_nsp > 0); /* work items have been set up */
- read_lock (g_lock);
+ read_lock_irqsave(g_lock, flags);
peer = kibnal_find_peer_locked (nid);
if (peer == NULL) {
- read_unlock (g_lock);
+ read_unlock_irqrestore(g_lock, flags);
tx->tx_status = -EHOSTUNREACH;
kibnal_tx_done (tx);
return;
conn, conn->ibc_state, conn->ibc_peer->ibp_nid,
atomic_read (&conn->ibc_refcount));
atomic_inc (&conn->ibc_refcount); /* 1 ref for the tx */
- read_unlock (g_lock);
+ read_unlock_irqrestore(g_lock, flags);
kibnal_queue_tx (tx, conn);
return;
}
/* Making one or more connections; I'll need a write lock... */
- read_unlock (g_lock);
- write_lock_irqsave (g_lock, flags);
+ read_unlock(g_lock);
+ write_lock(g_lock);
peer = kibnal_find_peer_locked (nid);
if (peer == NULL) {
kib_peer_t *peer;
kib_conn_t *conn;
struct list_head *ctmp;
+ unsigned long flags;
again:
/* NB. We expect to have a look at all the peers and not find any
* rdmas to time out, so we just use a shared lock while we
* take a look... */
- read_lock (&kibnal_data.kib_global_lock);
+ read_lock_irqsave(&kibnal_data.kib_global_lock, flags);
list_for_each (ptmp, peers) {
peer = list_entry (ptmp, kib_peer_t, ibp_list);
atomic_read (&conn->ibc_refcount));
atomic_inc (&conn->ibc_refcount);
- read_unlock (&kibnal_data.kib_global_lock);
+ read_unlock_irqrestore(&kibnal_data.kib_global_lock,
+ flags);
CERROR("Timed out RDMA with "LPX64"\n",
peer->ibp_nid);
}
}
- read_unlock (&kibnal_data.kib_global_lock);
+ read_unlock_irqrestore(&kibnal_data.kib_global_lock, flags);
}
void