]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: get_system_obj does not use result of get_system_obj_state 11444/head
authorCasey Bodley <cbodley@redhat.com>
Wed, 12 Oct 2016 12:55:52 +0000 (08:55 -0400)
committerCasey Bodley <cbodley@redhat.com>
Fri, 14 Oct 2016 20:53:04 +0000 (16:53 -0400)
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>
src/rgw/rgw_rados.cc

index 80ebc273c0fcb3f09a55a59371f2f98367f7772a..3a9f8fc1408f4604d7618c57863e93dbca3a9880 100644 (file)
@@ -9373,14 +9373,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
@@ -9398,7 +9392,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;