]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/DBObjectMap : fix recurcive lock in get_keys
authorxinxin shu <xinxin.shu@intel.com>
Wed, 3 Jun 2015 22:51:39 +0000 (06:51 +0800)
committerxinxin shu <xinxin.shu@intel.com>
Sun, 14 Jun 2015 18:45:42 +0000 (02:45 +0800)
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>
src/os/DBObjectMap.cc

index 4ffd2832715431a90b8525b6a44d6f12778a53eb..43dba25f2f51cae096e228e3af3144fff9202c15 100644 (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();