[sheepdog] [PATCH 4/5] object cache: remove redundant code

Liu Yuan namei.unix at gmail.com
Sat Aug 4 10:11:31 CEST 2012


From: Liu Yuan <tailai.ly at taobao.com>

We only need set CREATE bit in dirty_tree_and_list_insert() once.

Signed-off-by: Liu Yuan <tailai.ly at taobao.com>
---
 sheep/object_cache.c |    2 --
 1 file changed, 2 deletions(-)

diff --git a/sheep/object_cache.c b/sheep/object_cache.c
index ddf2a1d..bb14fb8 100644
--- a/sheep/object_cache.c
+++ b/sheep/object_cache.c
@@ -254,8 +254,6 @@ dirty_tree_and_list_insert(struct object_cache *oc, uint32_t idx,
 		else {
 			/* already has this entry, merge bmap */
 			entry->bmap |= bmap;
-			if (create)
-				entry->idx |= CACHE_CREATE_BIT;
 			return entry;
 		}
 	}
-- 
1.7.10.2




More information about the sheepdog mailing list