From: Yehuda Sadeh Date: Thu, 16 Jan 2014 19:33:49 +0000 (-0800) Subject: rgw: don't return -ENOENT in put_obj_meta() X-Git-Tag: v0.67.6~27 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1e2984ac4a4ed0508e1b5efc8b69ae4da0cac824;p=ceph.git rgw: don't return -ENOENT in put_obj_meta() 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 (cherry picked from commit 5c24a7ea905587fd4077e3b0cfc0f5ad2b178c29) --- diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 2cb30e7f09a5..7127e0d2335e 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -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; }