From: levin li <xingke.lwp at taobao.com> Local gateway request doesn't allocate memory for data, so outstanding_data_size is useless, nr_outstanding_reqs is also useless here, and as alloc_local_req() is called in worker thread, it may cause race, so this patch remove them from local gateway request path. Signed-off-by: levin li <xingke.lwp at taobao.com> --- sheep/sdnet.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sheep/sdnet.c b/sheep/sdnet.c index 01b598f..764865c 100644 --- a/sheep/sdnet.c +++ b/sheep/sdnet.c @@ -400,9 +400,6 @@ static struct request *alloc_local_request(void *data, int data_length) INIT_LIST_HEAD(&req->request_list); - sys->nr_outstanding_reqs++; - sys->outstanding_data_size += data_length; - return req; } @@ -482,9 +479,6 @@ void put_request(struct request *req) if (req->local) { req->done = 1; - sys->nr_outstanding_reqs--; - sys->outstanding_data_size -= req->data_length; - eventfd_write(req->wait_efd, value); } else { if (conn_tx_on(&ci->conn)) { -- 1.7.10 |