[Sheepdog] [PATCH] remove unused vnodes_info in start_deletion()

Li Wenpeng levin108 at gmail.com
Wed May 2 11:16:56 CEST 2012


From: levin li <xingke.lwp at taobao.com>

I noticed there's a vnodes_info defined and set to NULL,
but never used except at last by put_vnodes_info(), so I
think we should remove it.

Signed-off-by: levin li <xingke.lwp at taobao.com>
---
 sheep/vdi.c |    3 ---
 1 file changed, 3 deletions(-)

diff --git a/sheep/vdi.c b/sheep/vdi.c
index 0788f26..d80ae34 100644
--- a/sheep/vdi.c
+++ b/sheep/vdi.c
@@ -618,7 +618,6 @@ out:
 int start_deletion(uint32_t vid, uint32_t epoch)
 {
 	struct deletion_work *dw = NULL;
-	struct vnode_info *vnode_info = NULL;
 	int ret = SD_RES_NO_MEM;
 	uint32_t root_vid;
 
@@ -667,10 +666,8 @@ int start_deletion(uint32_t vid, uint32_t epoch)
 	list_add_tail(&dw->dw_siblings, &deletion_work_list);
 	queue_work(sys->deletion_wqueue, &dw->work);
 out:
-	put_vnode_info(vnode_info);
 	return SD_RES_SUCCESS;
 err:
-	put_vnode_info(vnode_info);
 	if (dw)
 		free(dw->buf);
 	free(dw);
-- 
1.7.10




More information about the sheepdog mailing list