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 <xinxin.shu@intel.com>
This commit is contained in:
xinxin shu 2015-06-04 06:51:39 +08:00
parent 440ef3a230
commit ce5ba43d69

View File

@ -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();