]> err.no Git - linux-2.6/commitdiff
RDMA/addr: list_move() cleanups
authorRoland Dreier <rolandd@cisco.com>
Wed, 29 Nov 2006 23:33:09 +0000 (15:33 -0800)
committerRoland Dreier <rolandd@cisco.com>
Wed, 29 Nov 2006 23:33:09 +0000 (15:33 -0800)
Replace a couple list_del()/list_add() combos with list_move().

Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/core/addr.c

index 15ba51806ffd115349d482ce79685487fce61347..7767a11b6890d4d88d2c61d1a3adcb3730a9c2e4 100644 (file)
@@ -235,8 +235,7 @@ static void process_req(void *data)
                        else if (req->status == -ENODATA)
                                continue;
                }
-               list_del(&req->list);
-               list_add_tail(&req->list, &done_list);
+               list_move_tail(&req->list, &done_list);
        }
 
        if (!list_empty(&req_list)) {
@@ -346,8 +345,7 @@ void rdma_addr_cancel(struct rdma_dev_addr *addr)
                if (req->addr == addr) {
                        req->status = -ECANCELED;
                        req->timeout = jiffies;
-                       list_del(&req->list);
-                       list_add(&req->list, &req_list);
+                       list_move(&req->list, &req_list);
                        set_timeout(req->timeout);
                        break;
                }