From: Samuel Just Date: Wed, 5 Mar 2014 20:50:43 +0000 (-0800) Subject: FileStore::_collection_move_rename: propogate EEXIST X-Git-Tag: v0.78~81^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1ddec86e64089530b6a989dc807deb2aba331482;p=ceph.git FileStore::_collection_move_rename: propogate EEXIST Previously, an EEXIST would get masked by the subsequent clone operation. Signed-off-by: Samuel Just --- diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index 43dea84e67bf..f6c51b345964 100644 --- a/src/os/FileStore.cc +++ b/src/os/FileStore.cc @@ -4465,10 +4465,12 @@ int FileStore::_collection_move_rename(coll_t oldcid, const ghobject_t& oldoid, _inject_failure(); - // the name changed; link the omap content - r = object_map->clone(oldoid, o, &spos); - if (r == -ENOENT) - r = 0; + if (r == 0) { + // the name changed; link the omap content + r = object_map->clone(oldoid, o, &spos); + if (r == -ENOENT) + r = 0; + } _inject_failure();