From: levin li <xingke.lwp at taobao.com> Signed-off-by: levin li <xingke.lwp at taobao.com> --- sheep/group.c | 2 +- sheep/sdnet.c | 12 ++++++------ sheep/sheep_priv.h | 2 +- sheep/vdi.c | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sheep/group.c b/sheep/group.c index 3f430ac..8675439 100644 --- a/sheep/group.c +++ b/sheep/group.c @@ -904,7 +904,7 @@ void sd_notify_handler(struct sd_node *sender, void *data, size_t data_len) memcpy(req->data, msg->data, msg->rsp.data_length); memcpy(&req->rp, &msg->rsp, sizeof(req->rp)); - req_done(req); + put_request(req); } } diff --git a/sheep/sdnet.c b/sheep/sdnet.c index 917e89d..23fe8a9 100644 --- a/sheep/sdnet.c +++ b/sheep/sdnet.c @@ -52,7 +52,7 @@ static void io_op_done(struct work *work) leave_cluster(); } - req_done(req); + put_request(req); return; } @@ -89,7 +89,7 @@ static void gateway_op_done(struct work *work) break; } - req_done(req); + put_request(req); return; retry: requeue_request(req); @@ -104,7 +104,7 @@ static void local_op_done(struct work *work) &req->rp, req->data); } - req_done(req); + put_request(req); } static void do_local_request(struct work *work) @@ -126,7 +126,7 @@ static int check_request_epoch(struct request *req) /* ask gateway to retry. */ req->rp.result = SD_RES_OLD_NODE_VER; req->rp.epoch = sys->epoch; - req_done(req); + put_request(req); return -1; } else if (after(req->rq.epoch, sys->epoch)) { eprintf("new node version %u, %u, %x\n", @@ -373,7 +373,7 @@ static void queue_request(struct request *req) return; done: - req_done(req); + put_request(req); } static void requeue_request(struct request *req) @@ -471,7 +471,7 @@ static void free_request(struct request *req) free(req); } -void req_done(struct request *req) +void put_request(struct request *req) { struct client_info *ci = req->ci; eventfd_t value = 1; diff --git a/sheep/sheep_priv.h b/sheep/sheep_priv.h index 05b44c9..02501d4 100644 --- a/sheep/sheep_priv.h +++ b/sheep/sheep_priv.h @@ -298,7 +298,7 @@ int objlist_cache_insert(uint64_t oid); void objlist_cache_remove(uint64_t oid); void object_cache_remove(uint64_t oid); -void req_done(struct request *req); +void put_request(struct request *req); /* Operations */ diff --git a/sheep/vdi.c b/sheep/vdi.c index 5063380..4ff61c8 100644 --- a/sheep/vdi.c +++ b/sheep/vdi.c @@ -465,7 +465,7 @@ static void delete_one_done(struct work *work) list_del(&dw->dw_siblings); - req_done(req); + put_request(req); free(dw->buf); free(dw); -- 1.7.10 |