Skip to content

Commit

Permalink
rgw: get_system_obj does not use result of get_system_obj_state
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
cbodley committed Oct 14, 2016
1 parent 907fde0 commit 973d007
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/rgw/rgw_rados.cc
Expand Up @@ -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
Expand All @@ -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;
Expand Down

0 comments on commit 973d007

Please sign in to comment.