From: Zhiqiang Wang Date: Thu, 8 Jan 2015 03:51:21 +0000 (+0800) Subject: FileStore: return error if get_index fails in lfn_open X-Git-Tag: v0.93~246^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8811df3e6d015b5bb4a77e869e35522d47720872;p=ceph.git FileStore: return error if get_index fails in lfn_open (*index).index is NULL if get_index fails, need to return error in this case. Signed-off-by: Zhiqiang Wang --- diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index d44ea82be96..191fbbf4214 100644 --- a/src/os/FileStore.cc +++ b/src/os/FileStore.cc @@ -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; }