]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: admin rest api shouldn't return error when getting user's stats if 21551/head
authorZhang Shaowen <zhangshaowen@cmss.chinamobile.com>
Fri, 20 Apr 2018 07:55:12 +0000 (15:55 +0800)
committerZhang Shaowen <zhangshaowen@cmss.chinamobile.com>
Fri, 20 Apr 2018 08:06:06 +0000 (16:06 +0800)
the user hasn't create any bucket.

Signed-off-by: Zhang Shaowen <zhangshaowen@cmss.chinamobile.com>
src/rgw/rgw_user.cc

index 2bf7bbe6a691199def910fe07af2dc76534a5a5d..772cd7bb2b5546d40c172c34c79bd02c168a560a 100644 (file)
@@ -2348,7 +2348,7 @@ int RGWUserAdminOp_User::info(RGWRados *store, RGWUserAdminOpState& op_state,
   RGWStorageStats *arg_stats = NULL;
   if (op_state.fetch_stats) {
     int ret = store->get_user_stats(info.user_id, stats);
-    if (ret < 0) {
+    if (ret < 0 && ret != -ENOENT) {
       return ret;
     }