]> git.apps.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>
Tue, 28 Jan 2014 20:24:24 +0000 (12:24 -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>
(cherry picked from commit 5c24a7ea905587fd4077e3b0cfc0f5ad2b178c29)

src/rgw/rgw_rados.cc

index 2cb30e7f09a50ed8b9715af197823fde5eedeb6f..7127e0d2335ee8fa2bf59825094d59caf0857987 100644 (file)
@@ -2356,7 +2356,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;
 }