[sheepdog] [PATCH] sheep: remove useless var in do_recover_object()
Liu Yuan
namei.unix at gmail.com
Mon May 28 16:39:57 CEST 2012
From: Liu Yuan <tailai.ly at taobao.com>
No logic inside the function references it at all.
Signed-off-by: Liu Yuan <tailai.ly at taobao.com>
---
sheep/recovery.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/sheep/recovery.c b/sheep/recovery.c
index 04ae60a..d5408e3 100644
--- a/sheep/recovery.c
+++ b/sheep/recovery.c
@@ -195,13 +195,12 @@ static int is_invalid_vnode(struct sd_vnode *entry, struct sd_node *nodes,
*/
static int do_recover_object(struct recovery_work *rw)
{
- struct vnode_info *old, *cur;
+ struct vnode_info *old;
uint64_t oid = rw->oids[rw->done];
uint32_t epoch = rw->epoch, tgt_epoch = rw->epoch - 1;
int nr_copies, ret, i, retry;
old = grab_vnode_info(rw->old_vnodes);
- cur = grab_vnode_info(rw->cur_vnodes);
again:
dprintf("try recover object %"PRIx64" from epoch %"PRIu32"\n",
@@ -252,14 +251,12 @@ again:
goto err;
}
- put_vnode_info(cur);
- cur = old;
+ put_vnode_info(old);
old = new_old;
goto again;
}
err:
put_vnode_info(old);
- put_vnode_info(cur);
return ret;
}
--
1.7.10.2
More information about the sheepdog
mailing list