Whamcloud - gitweb
LU-9679 lnet: use LIST_HEAD() for local lists.
[fs/lustre-release.git] / lnet / selftest / console.c
index 1721d65..ccaced7 100644 (file)
@@ -315,12 +315,10 @@ lstcon_group_ndlink_move(struct lstcon_group *old,
        unsigned int idx = LNET_NIDADDR(ndl->ndl_node->nd_id.nid) %
                                        LST_NODE_HASHSIZE;
 
-       list_del(&ndl->ndl_hlink);
-       list_del(&ndl->ndl_link);
        old->grp_nnode--;
 
-       list_add_tail(&ndl->ndl_hlink, &new->grp_ndl_hash[idx]);
-       list_add_tail(&ndl->ndl_link, &new->grp_ndl_list);
+       list_move_tail(&ndl->ndl_hlink, &new->grp_ndl_hash[idx]);
+       list_move_tail(&ndl->ndl_link, &new->grp_ndl_list);
        new->grp_nnode++;
 }
 
@@ -1493,11 +1491,9 @@ static int
 lstcon_ndlist_stat(struct list_head *ndlist,
                   int timeout, struct list_head __user *result_up)
 {
-       struct list_head    head;
+       LIST_HEAD(head);
        struct lstcon_rpc_trans *trans;
-       int                 rc;
-
-       INIT_LIST_HEAD(&head);
+       int rc;
 
         rc = lstcon_rpc_trans_ndlist(ndlist, &head,
                                      LST_TRANS_STATQRY, NULL, NULL, &trans);