@@ -1482,8 +1482,7 @@ bool D4NFilterObject::check_head_exists_in_cache_get_oid(const DoutPrefixProvide
14821482 return found_in_cache;
14831483}
14841484
1485- int D4NFilterObject::get_obj_attrs (optional_yield y, const DoutPrefixProvider* dpp,
1486- rgw_obj* target_obj)
1485+ int D4NFilterObject::get_obj_attrs (optional_yield y, const DoutPrefixProvider* dpp)
14871486{
14881487 bool is_latest_version = true ;
14891488 if (this ->have_instance ()) {
@@ -1502,17 +1501,14 @@ int D4NFilterObject::get_obj_attrs(optional_yield y, const DoutPrefixProvider* d
15021501 rgw::sal::Attrs attrs;
15031502 std::string version;
15041503 ldpp_dout (dpp, 10 ) << " D4NFilterObject::" << __func__ << " (): Fetching attrs from backend store." << dendl;
1505- auto ret = next->get_obj_attrs (y, dpp, target_obj);
1506- if (ret < 0 || !target_obj) {
1507- if (!target_obj) {
1508- ret = -ENOENT;
1509- }
1504+ auto ret = next->get_obj_attrs (y, dpp);
1505+ if (ret < 0 ) {
15101506 ldpp_dout (dpp, 0 ) << " D4NFilterObject::" << __func__ << " (): Failed to fetching attrs from backend store with ret: " << ret << dendl;
15111507 return ret;
15121508 }
15131509
15141510 this ->load_obj_state (dpp, y);
1515- this ->obj = *target_obj ;
1511+ this ->obj = next-> get_obj () ;
15161512 if (!this ->obj .key .instance .empty ()) {
15171513 this ->set_instance (this ->obj .key .instance );
15181514 }
@@ -2099,8 +2095,7 @@ int D4NFilterObject::D4NFilterReadOp::get_attr(const DoutPrefixProvider* dpp, co
20992095{
21002096 rgw::sal::Attrs& attrs = source->get_attrs ();
21012097 if (attrs.empty ()) {
2102- rgw_obj obj = source->get_obj ();
2103- auto ret = source->get_obj_attrs (y, dpp, &obj);
2098+ auto ret = source->get_obj_attrs (y, dpp);
21042099 if (ret < 0 ) {
21052100 ldpp_dout (dpp, 0 ) << " D4NFilterObject::" << __func__ << " (): Error: failed to fetch attrs, ret=" << ret << dendl;
21062101 return ret;
0 commit comments