From ce5ba43d69dd73f9a28219356a36c1947dc1f64e Mon Sep 17 00:00:00 2001 From: xinxin shu Date: Thu, 4 Jun 2015 06:51:39 +0800 Subject: [PATCH] os/DBObjectMap : fix recurcive lock in get_keys 1. get_keys obtain header lock of oid 2. get iterator with get_iterator(oid), in get_iterator, it also want to get header lock of oid Signed-off-by: xinxin shu --- src/os/DBObjectMap.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/os/DBObjectMap.cc b/src/os/DBObjectMap.cc index 4ffd2832715..43dba25f2f5 100644 --- a/src/os/DBObjectMap.cc +++ b/src/os/DBObjectMap.cc @@ -771,7 +771,7 @@ int DBObjectMap::get_keys(const ghobject_t &oid, Header header = lookup_map_header(hl, oid); if (!header) return -ENOENT; - ObjectMapIterator iter = get_iterator(oid); + ObjectMapIterator iter = _get_iterator(header); for (iter->seek_to_first(); iter->valid(); iter->next()) { if (iter->status()) return iter->status();