Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-9679 lnet: use LIST_HEAD() for local lists.
[fs/lustre-release.git]
/
lnet
/
klnds
/
gnilnd
/
gnilnd_conn.c
diff --git
a/lnet/klnds/gnilnd/gnilnd_conn.c
b/lnet/klnds/gnilnd/gnilnd_conn.c
index
a3f7c75
..
9fa539c
100644
(file)
--- a/
lnet/klnds/gnilnd/gnilnd_conn.c
+++ b/
lnet/klnds/gnilnd/gnilnd_conn.c
@@
-733,7
+733,7
@@
kgnilnd_pack_connreq(kgn_connreq_t *connreq, kgn_conn_t *conn,
int err = 0;
/* ensure we haven't violated max datagram size */
int err = 0;
/* ensure we haven't violated max datagram size */
-
CLASSERT(sizeof(kgn_connreq_t) <=
GNI_DATAGRAM_MAXSIZE);
+
BUILD_BUG_ON(sizeof(kgn_connreq_t) >
GNI_DATAGRAM_MAXSIZE);
/* no need to zero out, we do that when allocating dgram */
connreq->gncr_magic = GNILND_MSG_MAGIC;
/* no need to zero out, we do that when allocating dgram */
connreq->gncr_magic = GNILND_MSG_MAGIC;
@@
-1546,9
+1546,9
@@
failed:
int
kgnilnd_cancel_net_dgrams(kgn_net_t *net)
{
int
kgnilnd_cancel_net_dgrams(kgn_net_t *net)
{
- kgn_dgram_t
*dg, *dgN;
-
struct list_head zombies
;
- int
i;
+ kgn_dgram_t *dg, *dgN;
+
LIST_HEAD(zombies)
;
+ int i;
ENTRY;
/* we want to cancel any outstanding dgrams - we don't want to rely
ENTRY;
/* we want to cancel any outstanding dgrams - we don't want to rely
@@
-1561,8
+1561,6
@@
kgnilnd_cancel_net_dgrams(kgn_net_t *net)
"in reset %d\n", net->gnn_shutdown,
kgnilnd_data.kgn_in_reset);
"in reset %d\n", net->gnn_shutdown,
kgnilnd_data.kgn_in_reset);
- INIT_LIST_HEAD(&zombies);
-
spin_lock(&net->gnn_dev->gnd_dgram_lock);
for (i = 0; i < *kgnilnd_tunables.kgn_peer_hash_size; i++) {
spin_lock(&net->gnn_dev->gnd_dgram_lock);
for (i = 0; i < *kgnilnd_tunables.kgn_peer_hash_size; i++) {
@@
-1588,7
+1586,7
@@
int
kgnilnd_cancel_wc_dgrams(kgn_device_t *dev)
{
kgn_dgram_t *dg, *dgN;
kgnilnd_cancel_wc_dgrams(kgn_device_t *dev)
{
kgn_dgram_t *dg, *dgN;
-
struct list_head zombies
;
+
LIST_HEAD(zombies)
;
ENTRY;
/* Time to kill the outstanding WC's
ENTRY;
/* Time to kill the outstanding WC's
@@
-1600,7
+1598,6
@@
kgnilnd_cancel_wc_dgrams(kgn_device_t *dev)
"in reset %d\n", kgnilnd_data.kgn_wc_kill,
kgnilnd_data.kgn_in_reset);
"in reset %d\n", kgnilnd_data.kgn_wc_kill,
kgnilnd_data.kgn_in_reset);
- INIT_LIST_HEAD(&zombies);
spin_lock(&dev->gnd_dgram_lock);
do {
spin_lock(&dev->gnd_dgram_lock);
do {
@@
-1614,10
+1611,8
@@
kgnilnd_cancel_wc_dgrams(kgn_device_t *dev)
kgnilnd_cancel_dgram_locked(dg);
/* WC could be DONE already, check and if so add to list to be released */
kgnilnd_cancel_dgram_locked(dg);
/* WC could be DONE already, check and if so add to list to be released */
- if (dg->gndg_state == GNILND_DGRAM_DONE) {
- list_del_init(&dg->gndg_list);
- list_add_tail(&dg->gndg_list, &zombies);
- }
+ if (dg->gndg_state == GNILND_DGRAM_DONE)
+ list_move_tail(&dg->gndg_list, &zombies);
}
} while (dg != NULL);
}
} while (dg != NULL);
@@
-1954,7
+1949,7
@@
kgnilnd_finish_connect(kgn_dgram_t *dgram)
/* Notify LNET that we now have a working connection to this peer.
* This is a Cray extension to the "standard" LND behavior.
*/
/* Notify LNET that we now have a working connection to this peer.
* This is a Cray extension to the "standard" LND behavior.
*/
- lnet_notify(peer->gnp_net->gnn_ni, peer->gnp_nid,
1
,
+ lnet_notify(peer->gnp_net->gnn_ni, peer->gnp_nid,
true, true
,
ktime_get_seconds());
/* drop our 'hold' ref */
ktime_get_seconds());
/* drop our 'hold' ref */