]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: don't return -ENOENT in put_obj_meta()
authorYehuda Sadeh <yehuda@inktank.com>
Thu, 16 Jan 2014 19:33:49 +0000 (11:33 -0800)
committerYehuda Sadeh <yehuda@inktank.com>
Thu, 16 Jan 2014 22:30:05 +0000 (14:30 -0800)
Fixes: #7168
An object put may race with the same object's delete. In this case just
ignore the error, same behavior as if object was created and then
removed.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
src/rgw/rgw_rados.cc

index a2515b587b32f9f98edc2a489be1c9a7bfde2abb..530250f29e85b587a64cb6d652975231c2a8b079 100644 (file)
@@ -2406,7 +2406,7 @@ done_cancel:
   /* we lost in a race, object was already overwritten, we
    * should treat it as a success
    */
-  if (r == -ECANCELED)
+  if (r == -ECANCELED || r == -ENOENT)
     r = 0;
   return r;
 }