[openib-general] [PATCH] RDMA/addr: Fix some cancellation problems in process_req().
Roland Dreier
rdreier at cisco.com
Mon Nov 27 19:41:04 PST 2006
thanks, queued for 2.6.20.
BTW, I noticed the code after your change:
list_del(&req->list);
list_add_tail(&req->list, &done_list);
So I also queued the patch below for a savings of a whopping 15 bytes
of .text on x86_64:
commit 922e0c40e423bb52246611b3117399a56e1da318
Author: Roland Dreier <rolandd at cisco.com>
Date: Mon Nov 27 19:38:32 2006 -0800
RDMA/addr: list_move() cleanups
Replace a couple list_del()/list_add() combos with list_move().
Signed-off-by: Roland Dreier <rolandd at cisco.com>
diff --git a/drivers/infiniband/core/addr.c b/drivers/infiniband/core/addr.c
index 15ba518..7767a11 100644
--- a/drivers/infiniband/core/addr.c
+++ b/drivers/infiniband/core/addr.c
@@ -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_ad
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;
}
More information about the general
mailing list