]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: get_system_obj does not use result of get_system_obj_state 11867/head
authorCasey Bodley <cbodley@redhat.com>
Wed, 12 Oct 2016 12:55:52 +0000 (08:55 -0400)
committerLoic Dachary <ldachary@redhat.com>
Wed, 9 Nov 2016 14:31:44 +0000 (15:31 +0100)
get_system_obj() calls get_system_obj_state() to send a [getxattrs,stat]
request and fill out an RGWObjState - but the results are not used

Fixes: http://tracker.ceph.com/issues/17580
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 973d0076958ec9416cbe9ebc1cec03ee147ca4f9)

src/rgw/rgw_rados.cc

index 3f348502d127b50dd3ff7ff990daa99fb920473f..e4a1a2efbdf44220d7e0720c984895eb6c55fcbe 100644 (file)
@@ -9057,14 +9057,8 @@ int RGWRados::get_system_obj(RGWObjectCtx& obj_ctx, RGWRados::SystemObject::Read
   uint64_t len;
   ObjectReadOperation op;
 
-  RGWObjState *astate = NULL;
-
   get_obj_bucket_and_oid_loc(obj, bucket, oid, key);
 
-  int r = get_system_obj_state(&obj_ctx, obj, &astate, NULL);
-  if (r < 0)
-    return r;
-
   if (end < 0)
     len = 0;
   else
@@ -9082,7 +9076,7 @@ int RGWRados::get_system_obj(RGWObjectCtx& obj_ctx, RGWRados::SystemObject::Read
   }
 
   librados::IoCtx *io_ctx;
-  r = read_state.get_ioctx(this, obj, &io_ctx);
+  int r = read_state.get_ioctx(this, obj, &io_ctx);
   if (r < 0) {
     ldout(cct, 20) << "get_ioctx() on obj=" << obj << " returned " << r << dendl;
     return r;