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 <zhiqiang.wang@intel.com>
This commit is contained in:
Zhiqiang Wang 2015-01-08 11:51:21 +08:00
parent 4280d004fb
commit 8811df3e6d

View 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;
}