[sheepdog] [PATCH 1/9] sheep: fix double put_vnode_info call

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Mon Sep 17 00:59:54 CEST 2012


If cluster status is not SD_STATUS_OK after the request is retried,
queue_request doesn't set req->vinfo and free_request calls
put_vnode_info again.

Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
 sheep/request.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/sheep/request.c b/sheep/request.c
index 31c2648..ec76b9b 100644
--- a/sheep/request.c
+++ b/sheep/request.c
@@ -403,8 +403,10 @@ done:
 
 static void requeue_request(struct request *req)
 {
-	if (req->vinfo)
+	if (req->vinfo) {
 		put_vnode_info(req->vinfo);
+		req->vinfo = NULL;
+	}
 	queue_request(req);
 }
 
-- 
1.7.2.5




More information about the sheepdog mailing list