crush: fix get_full_location_ordered

This should return -ENOENT when an id is not present.  Broken by
746069ee62.

Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
Sage Weil 2013-12-28 08:55:02 -08:00
parent 23f715ba82
commit d4f07cd90b

View File

@ -323,6 +323,8 @@ map<string, string> CrushWrapper::get_full_location(int id)
int CrushWrapper::get_full_location_ordered(int id, vector<pair<string, string> >& path)
{
if (!item_exists(id))
return -ENOENT;
int cur = id;
int ret;
while (true) {