[sheepdog] [PATCH 1/2] object cache: init entry lock
Liu Yuan
namei.unix at gmail.com
Mon Jan 28 04:05:06 CET 2013
From: Liu Yuan <tailai.ly at taobao.com>
This entry lock initilization was carelessly dropped while splitting the
'optimize push' patch.
Signed-off-by: Liu Yuan <tailai.ly at taobao.com>
---
sheep/object_cache.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sheep/object_cache.c b/sheep/object_cache.c
index d4f95e1..355acae 100644
--- a/sheep/object_cache.c
+++ b/sheep/object_cache.c
@@ -643,6 +643,7 @@ alloc_cache_entry(struct object_cache *oc, uint32_t idx)
entry = xzalloc(sizeof(*entry));
entry->oc = oc;
entry->idx = idx;
+ pthread_rwlock_init(&entry->lock, NULL);
INIT_LIST_HEAD(&entry->dirty_list);
INIT_LIST_HEAD(&entry->lru_list);
--
1.7.9.5
More information about the sheepdog
mailing list