]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: remove user email index using helper function 11469/head
authorYehuda Sadeh <yehuda@redhat.com>
Wed, 5 Oct 2016 18:41:42 +0000 (11:41 -0700)
committerLoic Dachary <ldachary@redhat.com>
Thu, 13 Oct 2016 09:37:42 +0000 (11:37 +0200)
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
(cherry picked from commit 10dbfc540aef5c3d45b7e3aabe61090c302f47ab)

src/rgw/rgw_user.cc

index ef4e644063ef24915e308501af9d22c417df817b..648a94b08ae063bd98bf682e807af9f045f60364 100644 (file)
@@ -2128,11 +2128,10 @@ int RGWUser::execute_modify(RGWUserAdminOpState& op_state, std::string *err_msg)
     user_info.user_email = op_email;
   } else if (op_email.empty() && op_state.user_email_specified) {
 
-    rgw_obj email_obj(store->zone.user_email_pool, user_info.user_email);
     ldout(store->ctx(), 10) << "removing email index: " << user_info.user_email << dendl;
-    ret = store->delete_system_obj(email_obj);
+    ret = rgw_remove_email_index(store, user_info.user_email);
     if (ret < 0 && ret != -ENOENT) {
-      ldout(store->ctx(), 0) << "ERROR: could not remove " << user_info.user_id << ":" << email_obj << ", should be fixed (err=" << ret << ")" << dendl;
+      ldout(store->ctx(), 0) << "ERROR: could not remove " << user_info.user_id << " index (err=" << ret << ")" << dendl;
       return ret;
     }
     user_info.user_email = "";