]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: guard olh modification
authorYehuda Sadeh <yehuda@redhat.com>
Sat, 24 Jan 2015 01:29:10 +0000 (17:29 -0800)
committerYehuda Sadeh <yehuda@redhat.com>
Thu, 29 Jan 2015 17:31:32 +0000 (09:31 -0800)
Add a check that validates that object still exists. This shouldn't really be
an issue, as we later compare the tag.

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

index 7c5df6295c9a784aed7bef47e301a70a661d60e6..2e2252e1c9e33e146228e3f5062eabe3d65ba721 100644 (file)
@@ -5711,6 +5711,8 @@ int RGWRados::olh_init_modification_impl(RGWObjState& state, rgw_obj& olh_obj, s
 
   if (!state.exists) {
     op.create(true);
+  } else {
+    op.assert_exists();
   }
 
   /*