]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
FileStore: return error if get_index fails in lfn_open 3320/head
authorZhiqiang Wang <zhiqiang.wang@intel.com>
Thu, 8 Jan 2015 03:51:21 +0000 (11:51 +0800)
committerZhiqiang Wang <zhiqiang.wang@intel.com>
Fri, 9 Jan 2015 02:18:06 +0000 (10:18 +0800)
(*index).index is NULL if get_index fails, need to return error in this
case.

Signed-off-by: Zhiqiang Wang <zhiqiang.wang@intel.com>
src/os/FileStore.cc

index d44ea82be964ade5b167580c5ab3140a72394ee5..191fbbf42148086b6ab029758daac8ba6af71ff8 100644 (file)
@@ -242,6 +242,10 @@ int FileStore::lfn_open(coll_t cid,
   }
   if (!((*index).index)) {
     r = get_index(cid, index);
+    if (r < 0) {
+      dout(10) << __func__ << " could not get index r = " << r << dendl;
+      return r;
+    }
   } else {
     need_lock = false;
   }