From: Matt Benjamin Date: Fri, 6 Jan 2017 20:16:32 +0000 (-0500) Subject: rgw_rados: sanitize dout print in GWRados::get_obj_iterate_cb(...) X-Git-Tag: v12.0.0~265^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F12767%2Fhead;p=ceph.git rgw_rados: sanitize dout print in GWRados::get_obj_iterate_cb(...) We cannot assume pbl may be deferenced. Per review, move the dout print into the r < 0 condition--since it's now an error, make it's trace level 0. Signed-off-by: Matt Benjamin --- diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 13afc5bc4454..8757baf1c578 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -1,4 +1,3 @@ - // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab @@ -9908,9 +9907,10 @@ int RGWRados::get_obj_iterate_cb(RGWObjectCtx *ctx, RGWObjState *astate, io_ctx.locator_set_key(key); r = io_ctx.aio_operate(oid, c, &op, NULL); - ldout(cct, 20) << "rados->aio_operate r=" << r << " bl.length=" << pbl->length() << dendl; - if (r < 0) - goto done_err; + if (r < 0) { + ldout(cct, 0) << "rados->aio_operate r=" << r << dendl; + goto done_err; + } // Flush data to client if there is any r = flush_read_list(d);